-
Notifications
You must be signed in to change notification settings - Fork 29
Repeat curls at equal intervals #2641
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
base: master
Are you sure you want to change the base?
Conversation
… timing of the curls and has logging
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2641 +/- ##
=======================================
Coverage 27.60% 27.60%
=======================================
Files 95 95
Lines 5422 5422
Branches 2523 2523
=======================================
Hits 1497 1497
Misses 3213 3213
Partials 712 712
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…without the container exiting. This helps in getting the logs
| // Invokes the client container and runs the curls | ||
| containerID, err = s.Executor().StartContainer(config.ContainerStartConfig{Name: "nginx-curl", Image: scheduled_curls_image, Command: []string{"python3", "/usr/bin/schedule-curls.py", numMetaIter, numIter, sleepBetweenCurlTime, sleepBetweenIterations, serverAddress}}) | ||
| s.Require().NoError(err) | ||
| s.ClientContainer = containerID[0:12] |
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.
Previously the container was started with a sleep command. That meant that no logs were obtained. Now that the container is started with the python script, we get logs for the python script.
Description
The
TestRepeatedNetworkFlowWithZeroAfterglowPeriodfails frequently with errors such asThis PR does not fix that, but improves logging for this test. A partial fix is in another PR #2642. This PR also makes it so that the intervals between the curls will be more precise. Currently a sleep is used between curls. This means that the time between the start of when two curl commands are executed is actually the sleep time plus the time taken by the curl command. This PR makes it so that the time between curl commands is actually the intended time.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Ran locally and checked the logs of the
qa-schedule-curlscontainer.Saw the following in the logs
The precision of
time.sleepis about 1-10ms so the timings still are not precise to the millisecond.