Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Runner thread / subprocess improvements #571

Merged
merged 68 commits into from
Oct 9, 2020

Commits on Jun 1, 2020

  1. Work in Progress: add slf4j-test

    This is a slf4j provider made to write test assertions against.
    
    But there can be only one slf4j provider on your classpath at the same time, otherwise who knows which will be used.
    
    the remal.component-metadata plugin identifies a lot of these sorts of conflicts so they don't happen silently.
    
    but that doesn't have spf4j-slf4j-test in its list of things it knows about, so we also need to specify that.
    
    once you've identified conflicts, you have to resolve them, which takes ten lines for some reason, so I put it in a function.
    
    debugging wasn't working very well on scripts included with `apply from`, and that's how I ended up writing a gradle plugin.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    b9236e1 View commit details
    Browse the repository at this point in the history
  2. maintenance: convert TestGameRunner to using slf4j-test

    with slight refactor to avoid mocking static method on Thread.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    97a9cac View commit details
    Browse the repository at this point in the history
  3. build.gradle: keep slf4j-api as an explicit dependency, but with flex…

    …ibility to satisfy both app and test code.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    17a74e8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c6a7d6d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bfed6b3 View commit details
    Browse the repository at this point in the history
  6. Work in Progress: We're going to have a GameStarter after all.

    The more I look at it the more it circles back to the current design.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    431bec3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9e84bcd View commit details
    Browse the repository at this point in the history
  8. Matcher hasItemsFrom

    like `hasItems` but it checks from one collection you pass to it, not each one of a variable number of arguments.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d3bbf91 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f16526e View commit details
    Browse the repository at this point in the history
  10. TestRunGameTask: split junit4 vintage tests

    so other tests can use jupiter Extension
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    fc8c7f5 View commit details
    Browse the repository at this point in the history
  11. TestRunGameTask has learned a lot of things about tasks and processes!

    We use TestFX so the JavaFX Task has an Application Thread to run in.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    c5d6ec9 View commit details
    Browse the repository at this point in the history
  12. TestRunGameTask streamlining

    Replace the GameStarter Interface with Callable<Process>.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    67a6fb6 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    0a38ce0 View commit details
    Browse the repository at this point in the history
  14. RunGameTask will throw an exception if the process fails to start or …

    …if it exits with error
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    16e2a5a View commit details
    Browse the repository at this point in the history
  15. We don't have a well-defined spec for thread cancellation.

    We don't want thread cancellation to terminate the process.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    e3c03e9 View commit details
    Browse the repository at this point in the history
  16. TestGameRunTask tidy

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d25b5f6 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6f4c4b6 View commit details
    Browse the repository at this point in the history
  18. Test process output parsing by providing a list of strings as an Inpu…

    …tStream.
    
     💭 "it'll be easy," they said.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    c28761d View commit details
    Browse the repository at this point in the history
  19. Separate the in-memory mocks from the ones that spawn real processes …

    …(or at least try to).
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d03adf0 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c369e98 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    ae83f5e View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4caf3ba View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    020f7d3 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    c2b76d0 View commit details
    Browse the repository at this point in the history
  25. removing old GameRunner and JUnit Vintage

    we don't use the annotation parts of spf4j-slf4j-test enough to keep Vintage around
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    38fa977 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    0883d01 View commit details
    Browse the repository at this point in the history
  27. upgrade game log output from TRACE to INFO

    This does is a spec change, but the best way to avoid this "test failure won't show us TRACE output unless we use the @CollectLogs decorator" is to not rely on TRACE output.
    
    Especially since we want game output more visible anyway, for troubleshooting on launch failure.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    3ee4bd7 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    ff45b5b View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    397f7cd View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    f3bca0a View commit details
    Browse the repository at this point in the history
  31. GameService to get the nitty-gritty details of the thread factory out…

    … of ApplicationController
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    19bc1ed View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    2020f83 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    7d3eb77 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    f89f1b7 View commit details
    Browse the repository at this point in the history
  35. Service lets the Controller bind handlers just once.

    Instead of having to re-bind every time we do a new run.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    8d544c6 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    03bb551 View commit details
    Browse the repository at this point in the history
  37. GameService: simplify executor, as Service doesn't need it for its im…

    …plementation of isRunning.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    2655b32 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    af7357f View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    ce704fa View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    6b002a5 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c49c377 View commit details
    Browse the repository at this point in the history
  42. GameService: do the GameStarter construction here

    This makes the dependency graph feel pretty good to me. GameService is responsible for translating Config/Settings to something RunGameTask needs.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    077ba1d View commit details
    Browse the repository at this point in the history
  43. GameService: log exceptions

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    0082b7c View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    a568d99 View commit details
    Browse the repository at this point in the history
  45. GameStarter: combine error stream with output stream

    otherwise we would need _another_ thread to watch the error stream.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    d0cdae6 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    71b3dbe View commit details
    Browse the repository at this point in the history
  47. 📓 docs for GameService

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    5250471 View commit details
    Browse the repository at this point in the history
  48. 📓 docs for GameStarter

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    8fd3151 View commit details
    Browse the repository at this point in the history
  49. 📓 docs for RunGameTask

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    a964476 View commit details
    Browse the repository at this point in the history
  50. 📓 docs for StringIteratorInputStream

    sort of. this thing.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    338ea23 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    a06a2c6 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    627d627 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    6e9d3e1 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    9efa232 View commit details
    Browse the repository at this point in the history
  55. doc(test): document Matcher.hasItemsFrom

    copied from upstream
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    f2267df View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    79fecfb View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    d43b8df View commit details
    Browse the repository at this point in the history
  58. fix(RunGameTask): throw GameExitTooSoon if it quit early

    without this, "quit launcher after start" could be frustrating.
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    676da02 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    ec6efd7 View commit details
    Browse the repository at this point in the history
  60. feat(RunGameTask): default message to string

    otherwise the logger shows `null`
    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    4a82b4d View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    4df2589 View commit details
    Browse the repository at this point in the history
  62. fixup rebase on 01d42d7

    keturn committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    b91167d View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2020

  1. Configuration menu
    Copy the full SHA
    6667350 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2020

  1. Configuration menu
    Copy the full SHA
    aa70a8b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    07cb1d8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    09859e7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6693419 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    55c74d5 View commit details
    Browse the repository at this point in the history