Commit 4c00a27
committed
Fix a race condition in the tests
Quick explanation of what the `GC tests for RemoteChannels` test does:
1. Create `RemoteChannel`s `rr` and `fstore` on worker 1 and worker 2
respectively from the master process. At this point only the master process
knows about `rr` and `fstore`.
2. Master process calls `put!(fstore, rr)`, i.e. we remotecall worker 2 and put
`rr` (which is owned worker 1 but is currently only known about by the
master) into `fstore`.
3. Remotecall into worker 1 and check that it knows about `rr`.
Step 3 should succeed despite us never previously explicitly communicating with
worker 1, because `serialize(::ClusterSerializer, ::RemoteChannel)` will send a
message to the owner of the `RemoteChannel` to inform them of its existence (see
`send_add_client()`). This happens asynchronously in step 2, and on rare
occasions worker 1 would not process that message before step 3, causing the
test to fail.
Now we give the check 10s to succeed.1 parent e990442 commit 4c00a27
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
0 commit comments