-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test/system: make some tests faster part 2 #22826
test/system: make some tests faster part 2 #22826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# #/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# #| FAIL: Sequential output from logs
# #| expected: =~ e1e85a9e2107 a
# #| > 640d8927bc2f b
# #| > 640d8927bc2f c
# #| > e1e85a9e2107 d
# #| actual: 640d8927bc2f b
# #| > 640d8927bc2f c
# #| > e1e85a9e2107 a
# #| > e1e85a9e2107 d
Oh well so much to my long testing for this one, DO NOT MERGE!
@edsantiago How much do you are about the fact that "podman logs - multi $driver" wants this output?
There is no way to guarantee ordering on reading end in podman logs. The only way to do so is with the ugly sleep's that were used before. So I wonder do I add some sleep's back or are you fine with we changing the tests to accept any order as long as the lines for the individual container are in the right order, i.e.
|
That's not something I care about. In theory it would be nice but if you think it's okay to waive that requirement, and other reviewers agree, I'm fine with loosening |
These changes LGTM |
There is no reason for this check to wait 4 seconds for the container to run, instead make sure to have a running process and then stop it directly with -t0 not have any delay. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The test used sleep to synchronize log output between both containers which is slow. There is actually no way to guarantee the ordering on the reading side so just remove the sleep's and check the the lines within the same container are in the right order. Trying to preserve the orignal ordering is just not possible if we speed up the test as it would flake to often. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Instead of iterating over all tmp dirs and creating test containers for each one we can just pass all files to one touch call. With that we have to create much less containers while still checking the same thing. This speeds up the test by about 4 seconds. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Do not wait 5 seconds, just stop the container directly. This speeds up the test by more than 4 seconds. One could make the case here that we want to check podman wait but there are so many other podman wait tests that it should not matter. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Use only one retry and a short stop timeout to speed them up. I am not sure if this will cause flakes, I have not seen any after trying for some time so I think this works just as well. And is about 2-3 seconds faster for both tests. If it does start to flake we can revert this commit again or write the test differently. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The current logic used podman logs I don't understand way, all we care about is the container output and we can just read the same with a attached podman run, of course we have to move it into the background but it did the some with logs. This also allows us to remove the extra log-driver checks and because podman logs seems to be much slower than the extra run we safe over 10s with this change. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This test is by far the slowest one taking over minute, the reason is that it is checking every single podman command for shell completions. The test is useful but it does not need to check the "..." argument 3 times. Test a second time to make sure not only the first arg is completed. This change makes it about 15 seconds faster. Long term we should get this test out of the main system tests together with other cli only tests as they do not need to run on each OS, etc... Signed-off-by: Paul Holzinger <pholzing@redhat.com>
use a command that stops on SIGTERM not sleep, that way the tests can continue to use podman kube down without waiting for the full stop timeout every time. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
The command does not react on sigterm, so kube down needs to wait 10s. To fix it first use a command that does but also write the yaml directly instead of doing the podman create && kube generate dance. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
1b76203
to
ad661b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
So many tests use sleep or run into the default 10s stop timeout, this is just part 2 of many
Part 1 #22821
Does this PR introduce a user-facing change?