Commit 06f2254
Deflake TestExecProcList.
There is a race in the test where the goroutine running Container.executeSync()
calls WaitPID() => IsSandboxRunning() which accesses Container.Sandbox.
This can race with the defer Container.Destroy which sets Sandbox = nil.
This race was introduced in 0968254 ("Speed up container_test") which got
rid of the read on channel `ch`.
Fix the race by exec-ing asynchronously. This maintains the old behavior of not
checking if the exit status of sleep.
Fixes 0968254 ("Speed up container_test")
PiperOrigin-RevId: 7365726001 parent 906fb31 commit 06f2254
1 file changed
+7
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
937 | 930 | | |
938 | 931 | | |
939 | 932 | | |
940 | 933 | | |
941 | | - | |
| 934 | + | |
942 | 935 | | |
943 | 936 | | |
944 | 937 | | |
| |||
0 commit comments