remulasce / metroapp

Realtime arrival notification utility for LA Metro
2 stars 0 forks source link

Test predictionmanager / stops updating to add new stops #174

Closed remulasce closed 9 years ago

remulasce commented 9 years ago

Ran into possible issue with stops not getting updates, or stops not adding newly available arrivals. So I'd like a test to make sure that happens.

remulasce commented 9 years ago

Update: It's kind of reproducible. Seems to happen at every long duration close. In this state, adding a new servicerequest does work correctly, ie the new request gets updates and such. GetRequestedInterval seems to be maxing at 30s

remulasce commented 9 years ago

Checking timeSinceLastUpdate. If the thing is stuck in update=true, it will always return 0.

remulasce commented 9 years ago

In debugger, trackinglist has 0. So predictions aren't getting added again on load.

remulasce commented 9 years ago

Looks like the save/restore requests method wasn't actually setting the requests to track again on load. Enhanced lifecycle-management looks to have fixed the issue.

remulasce commented 9 years ago

Obviously, the point is to actually test for this now. Reopening.

remulasce commented 9 years ago

Test strategy:

  1. Basic setup, add a stop request. Ensure predictionmanager, requesthandler has 1 tracked requests. This is identical to the one already in CoreIntegrationTest
  2. Serialize, then deserialize the request, using the full newpopulator, etc lifecycle. Test the same.
remulasce commented 9 years ago

Test is in. Didn't actually serialize because it's not cross-platform. Instead, just keep a reference to it, assume serialize function works, and put unit tests on that.