Skip to content
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

skipper: fix shutdown test #2462

Merged
merged 1 commit into from
Jul 24, 2023
Merged

skipper: fix shutdown test #2462

merged 1 commit into from
Jul 24, 2023

Conversation

AlexanderYastrebov
Copy link
Member

Make test request in parallel to ensure another request is refused not only after shutdown started but also while shutdown is still in progress (i.e. while test request is still in progress).

Verify shutdown completes after test request is finished.

Rename tests to have the same prefix.

Updates #988 #1865

Comment on lines -332 to -335
t.Logf("ongoing request passing in before shutdown")
r, err := waitConnGet(testUrl)
require.NoError(t, err)
require.Equal(t, 200, r.StatusCode)
Copy link
Member Author

@AlexanderYastrebov AlexanderYastrebov Jul 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here was the problem: request takes 3s so at this point it is 3.5 seconds after shutdown started. The subsequent request surely fails because server has already finished shutting down, i.e. it was not testing shutdown-in-progress.

Make test request in parallel to ensure another request is refused
not only after shutdown started but also while shutdown is still in progress
(i.e. while test request is still in progress).

Verify shutdown completes after test request is finished.

Rename tests to have the same prefix.

Updates #988 #1865

Signed-off-by: Alexander Yastrebov <[email protected]>
@MustafaSaber
Copy link
Member

👍

Copy link
Member

@MustafaSaber MustafaSaber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how logs describe the flow

@AlexanderYastrebov
Copy link
Member Author

👍

@AlexanderYastrebov AlexanderYastrebov merged commit 1817eda into master Jul 24, 2023
8 checks passed
@AlexanderYastrebov AlexanderYastrebov deleted the fix-shutdown-test branch July 24, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants