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

Update caching transport and tests #1617

Merged
merged 16 commits into from
May 3, 2022

Conversation

mattjohnsonpint
Copy link
Contributor

@mattjohnsonpint mattjohnsonpint commented Apr 29, 2022

Some improvements to the caching transport, mostly around tests:

  • Most of the tests immediately stop the worker and then flush it manually later. Add a boolean startWorker that can be set false on these tests to just not have a worker started to begin with.
  • Several tests didn't need a cache worker, and had one previously.
  • The AwareOfExistingFiles test was passing, but wasn't actually testing what we thought it was. It does now.
  • The WorksInBackground test was watching the directory to know when it was finished. Rewrote to watch an event fired on the inner transport. No need to watch the directory at all now.
  • On the caching transport itself, recovery of files left in processing was being done with the worker start. Moved this to initialization so that it always happens, even if the worker is shutting down or when there's not a worker. This mostly is for the test to pass, but is a good idea anyway.

@mattjohnsonpint
Copy link
Contributor Author

Looks like there's still a race condition in the AwareOfExistingFiles test. I'll come back to this...

@mattjohnsonpint mattjohnsonpint changed the title Update caching transport tests Update caching transport and tests Apr 30, 2022
@mattjohnsonpint mattjohnsonpint marked this pull request as ready for review April 30, 2022 18:57
@mattjohnsonpint mattjohnsonpint marked this pull request as draft April 30, 2022 19:21
@mattjohnsonpint
Copy link
Contributor Author

It's good at this point, but I see a few more related improvements to make. More coming shortly. 😉

@mattjohnsonpint mattjohnsonpint marked this pull request as ready for review April 30, 2022 22:15
@mattjohnsonpint
Copy link
Contributor Author

Good enough for now. Ready for review. Thanks.

@mattjohnsonpint mattjohnsonpint merged commit fe5b60b into main May 3, 2022
@mattjohnsonpint mattjohnsonpint deleted the simplify-caching-transport-tests branch May 3, 2022 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants