-
Notifications
You must be signed in to change notification settings - Fork 20
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
P-150 feat: unit test for threadpool behaviour #2186
Conversation
Can you try to link the Linear issue too :) |
P-150 Create artificial lag for testing threadpool behavior
ContextThis was mentioned in #2159 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The logic looks fine, I've got two questions:
- can we simply implement
watch_top
in AuthorApiMock? We are free to change it :) - to avoid repeating the code - can we have a test case where we have more than
n_workers
tasks (can be delayed A1) and see them returning in batch? Like then_workers + 1
th task should be processed only after we have vacant thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general. I left two comments. I think the one regarding feature toggle needs to be addresed at least.
tee-worker/litentry/core/stf-task/receiver/src/handler/assertion.rs
Outdated
Show resolved
Hide resolved
We need to resolve the conflict and then we are good to go I guess? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's solved the conflicts and merge.
Resolves #2165
Some notes:
watch_top
sends the trusted operation via a channel and we can use this channel to assert the order of operations.A1
under thetest
feature to create artificial lag during testing so that I can demonstrate the expected behaviour of threadpool