Wait for capacity change in multiple activators test. (#7629)
Wait for capacity change in multiple activators test. (#7629)

This test used to wait for the activator index to change before going on. That condition only tells half of the truth. After we set the activator index, the capacity computation is not yet done and it might take a while for that to happen and to propagate to the state. Our requests can race that and we assume that only one request is allowed to pass in this test. If more than one requests pass, they both get locked forever and thus the test times out.

Instead, we need to wait for the capacity to be the expected value. That is the very last computation in the update flow and once that's done, we know that an activator is successfully assigned and that we processed the provided application endpoints successfully.
knative/serving,knative/serving