Commit acc7044
committed
test: cleanup and improve "wait for readiness" checks
In Microvm.spawn(), we try to wait for the firecracker process to
initialize itself and become ready to server requests. We have multiple
checks of varying fidelity in there, and they can be strictly ordered by
this based on what they wait for: e.g. if we wait for SSH availability
(guest userspace is ready), there is no point to _also_ wait for
firecracker's startup message in the logs, as that is always printed
before SSH becomes available. Thus clean this logic up to only do the
one check that has the highest fidelity in any given setup.
While we're at it, update/move some comments.
Then, improve the check for API server readiness to wait for the log
message that signals completion of API server initialization, instead of
just waiting for socket file creation (which happens before we are
actually ready to accept connections on it).
Signed-off-by: Patrick Roy <[email protected]>1 parent 90774bd commit acc7044
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
698 | 701 | | |
699 | 702 | | |
700 | | - | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
701 | 709 | | |
702 | 710 | | |
703 | 711 | | |
704 | 712 | | |
705 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
706 | 718 | | |
707 | 719 | | |
708 | 720 | | |
| |||
0 commit comments