Fix data race in unit tests #318

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:fix/processors_race into master 2023-05-04 14:06:31 +00:00

Closes #311

Closes #311
dstepanov-yadro requested review from storage-core-committers 2023-05-04 11:15:19 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-05-04 11:15:19 +00:00
carpawell reviewed 2023-05-04 11:40:49 +00:00
carpawell left a comment
Contributor

basically it is not a node but ir?

basically it is not a `node` but `ir`?
fyrchik reviewed 2023-05-04 12:01:25 +00:00
@ -255,3 +255,3 @@
proc.handleBind(evBind)
time.Sleep(time.Second)
for proc.pool.Running() > 0 {
Owner

How about require.Eventually? -- we can set maximum wait time there.

How about `require.Eventually`? -- we can set maximum wait time there.
Author
Member

A data race occurred due to a read before the pool goroutine was completed. I think it will end up being the same data race in case of eventually.

A data race occurred due to a read before the pool goroutine was completed. I think it will end up being the same data race in case of `eventually`.
Owner

Why, though? Eventually will fail the test if the condition is not true after some time, so the following code will not be executed.

Why, though? `Eventually` will fail the test if the condition is not true after some time, so the following code will not be executed.
dstepanov-yadro force-pushed fix/processors_race from 610f1f39d1 to 554ac18c91 2023-05-04 12:35:08 +00:00 Compare
Author
Member

basically it is not a node but ir?

fixed

> basically it is not a `node` but `ir`? fixed
acid-ant approved these changes 2023-05-04 12:43:15 +00:00
fyrchik approved these changes 2023-05-04 13:35:36 +00:00
carpawell approved these changes 2023-05-04 13:39:35 +00:00
dstepanov-yadro force-pushed fix/processors_race from 554ac18c91 to f4e522da68 2023-05-04 13:56:37 +00:00 Compare
dstepanov-yadro force-pushed fix/processors_race from f4e522da68 to 2f6757c828 2023-05-04 13:59:23 +00:00 Compare
fyrchik approved these changes 2023-05-04 14:06:24 +00:00
fyrchik merged commit 2f6757c828 into master 2023-05-04 14:06:31 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#318
No description provided.