Let a later test's verb run after the served controller stops (issue 1945)
serve marks the process as handing over once it stops, and refuses every verb from then on; the served tests run it in the test process, so the connection test's conditions verb was refused without its own process ever starting.
This commit is contained in:
@@ -230,6 +230,13 @@ func aServedMesh(t *testing.T) *servedMesh {
|
||||
case <-time.After(30 * time.Second):
|
||||
t.Log("the controller did not stop within 30 s")
|
||||
}
|
||||
// A stopping controller refuses every verb from then on as a handover (issue 289), which its process exits
|
||||
// after; this one is the test process, so a later test's verb would be refused without running (issue 1945:
|
||||
// the conditions verb's own process was never started). Its stop marks it once the serving context ends.
|
||||
for deadline := time.Now().Add(5 * time.Second); !handingOver.Load() && time.Now().Before(deadline); {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
handingOver.Store(false)
|
||||
})
|
||||
// Served once both nodes have their own composition: the start's pass ran.
|
||||
for _, node := range []string{"anchor", "laptop"} {
|
||||
|
||||
Reference in New Issue
Block a user