Commit f9d3d89
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 3a43532 commit f9d3d89
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
299 | 301 | | |
300 | 302 | | |
301 | 303 | | |
| |||
0 commit comments