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

adjust timeouts so tests have better chance of succeeding #3549

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func TestCoordinatorShutdownTimeout(t *testing.T) {
}

func TestCoordinatorShutdownErrorOneResponse(t *testing.T) {
CoordinatorShutdownTimeout = time.Millisecond
CoordinatorShutdownTimeout = 10 * time.Millisecond
handlerChan, _, _, config := setupAndWaitCoordinatorDone()

cfgErrStr := "config watcher error"
Expand All @@ -335,7 +335,7 @@ func TestCoordinatorShutdownErrorOneResponse(t *testing.T) {
}

func TestCoordinatorShutdownErrorAllResponses(t *testing.T) {
CoordinatorShutdownTimeout = time.Millisecond
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this make the value of the shutdown timeout dependent on the order in which tests are executed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch, I added these back and set to what the default is during normal operations

CoordinatorShutdownTimeout = 5 * time.Second
handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone()
runtimeErrStr := "runtime error"
varsErrStr := "vars error"
Expand All @@ -350,7 +350,7 @@ func TestCoordinatorShutdownErrorAllResponses(t *testing.T) {
}

func TestCoordinatorShutdownAllResponsesNoErrors(t *testing.T) {
CoordinatorShutdownTimeout = time.Millisecond
CoordinatorShutdownTimeout = 5 * time.Second
handlerChan, runtime, varWatcher, config := setupAndWaitCoordinatorDone()
runtime <- nil
varWatcher <- nil
Expand Down
Loading