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

e2e: fix and modernize rescheduling test #19105

Merged
merged 4 commits into from
Nov 16, 2023
Merged

e2e: fix and modernize rescheduling test #19105

merged 4 commits into from
Nov 16, 2023

Conversation

tgross
Copy link
Member

@tgross tgross commented Nov 16, 2023

The E2E test suite for rescheduling had a few bugs:

This changeset also updates the whole test suite to move it off the v1 "framework". The test assertions are otherwise left untouched.

Fixes: #19076


Example run:

$ go test -v ./e2e/rescheduling -count=1 -timeout=20m
=== RUN   TestRescheduling_Service_NoReschedule
--- PASS: TestRescheduling_Service_NoReschedule (1.33s)
=== RUN   TestRescheduling_System_NoReschedule
--- PASS: TestRescheduling_System_NoReschedule (1.10s)
=== RUN   TestRescheduling_Default
--- PASS: TestRescheduling_Default (36.17s)
=== RUN   TestRescheduling_MaxAttempts
--- PASS: TestRescheduling_MaxAttempts (2.28s)
=== RUN   TestRescheduling_Success
--- PASS: TestRescheduling_Success (1.10s)
=== RUN   TestRescheduling_WithUpdate
--- PASS: TestRescheduling_WithUpdate (4.26s)
=== RUN   TestRescheduling_WithCanary
--- PASS: TestRescheduling_WithCanary (6.70s)
=== RUN   TestRescheduling_WithCanaryAutoRevert
--- PASS: TestRescheduling_WithCanaryAutoRevert (11.05s)
=== RUN   TestRescheduling_MaxParallel
--- PASS: TestRescheduling_MaxParallel (11.54s)
=== RUN   TestRescheduling_MaxParallelAutoRevert
--- PASS: TestRescheduling_MaxParallelAutoRevert (12.06s)
=== RUN   TestRescheduling_ProgressDeadline
--- PASS: TestRescheduling_ProgressDeadline (22.12s)
=== RUN   TestRescheduling_ProgressDeadlineFail
--- PASS: TestRescheduling_ProgressDeadlineFail (21.23s)
PASS
ok      github.com/hashicorp/nomad/e2e/rescheduling     130.965s

The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". The test assertions are otherwise left untouched.
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

just a couple tidbits for consideration, otherwise LGTM!

though I'm not seeing where this is being addressed?

Two of the input jobs were actually invalid but were only correctly detected as such because of #17342

e2e/rescheduling/rescheduling_test.go Outdated Show resolved Hide resolved
e2e/rescheduling/rescheduling_test.go Outdated Show resolved Hide resolved
e2e/rescheduling/rescheduling_test.go Outdated Show resolved Hide resolved
e2e/rescheduling/rescheduling_test.go Outdated Show resolved Hide resolved
@tgross
Copy link
Member Author

tgross commented Nov 16, 2023

Results after fixes:

$ go test -v -count=1 ./e2e/rescheduling
=== RUN   TestRescheduling_Service_NoReschedule
--- PASS: TestRescheduling_Service_NoReschedule (1.05s)
=== RUN   TestRescheduling_System_NoReschedule
--- PASS: TestRescheduling_System_NoReschedule (1.08s)
=== RUN   TestRescheduling_Default
--- PASS: TestRescheduling_Default (36.33s)
=== RUN   TestRescheduling_MaxAttempts
--- PASS: TestRescheduling_MaxAttempts (2.15s)
=== RUN   TestRescheduling_Success
--- PASS: TestRescheduling_Success (1.89s)
=== RUN   TestRescheduling_WithUpdate
--- PASS: TestRescheduling_WithUpdate (4.06s)
=== RUN   TestRescheduling_WithCanary
--- PASS: TestRescheduling_WithCanary (7.00s)
=== RUN   TestRescheduling_WithCanaryAutoRevert
--- PASS: TestRescheduling_WithCanaryAutoRevert (11.64s)
=== RUN   TestRescheduling_MaxParallel
--- PASS: TestRescheduling_MaxParallel (9.89s)
=== RUN   TestRescheduling_MaxParallelAutoRevert
--- PASS: TestRescheduling_MaxParallelAutoRevert (11.63s)
=== RUN   TestRescheduling_ProgressDeadline
--- PASS: TestRescheduling_ProgressDeadline (22.17s)
=== RUN   TestRescheduling_ProgressDeadlineFail
--- PASS: TestRescheduling_ProgressDeadlineFail (21.19s)
PASS
ok      github.com/hashicorp/nomad/e2e/rescheduling     130.098s

Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

just one last test helper nit-pick!

e2e/rescheduling/rescheduling_test.go Outdated Show resolved Hide resolved
@tgross tgross merged commit da61d27 into main Nov 16, 2023
18 checks passed
@tgross tgross deleted the e2e-rescheduling branch November 16, 2023 20:39
tgross added a commit that referenced this pull request Nov 16, 2023
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076
tgross added a commit that referenced this pull request Nov 16, 2023
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076
tgross added a commit that referenced this pull request Nov 16, 2023
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076

Co-authored-by: Tim Gross <tgross@hashicorp.com>
tgross added a commit that referenced this pull request Nov 16, 2023
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of #17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: #19076

Co-authored-by: Tim Gross <tgross@hashicorp.com>
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of hashicorp#17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: hashicorp#19076
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
The E2E test suite for rescheduling had a few bugs:
* Using the command line to stop a job with a failing deployment returns a non-zero exit
  code, which would cause an otherwise passing test to fail.
* Two of the input jobs were actually invalid but were only correctly detected
  as such because of hashicorp#17342

This changeset also updates the whole test suite to move it off the v1
"framework". A few test assertions are also de-flaked.

Fixes: hashicorp#19076
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.5.x backport to 1.5.x release line backport/1.6.x backport to 1.6.x release line theme/e2e theme/restart/reschedule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e: RescheduleE2ETest/TestDefaultReschedule is failing
2 participants