Repository navigation
test(acceptance): check #2332's run outcomes, not their stamps (#2347) - #2348
Merged
Merged
Conversation
1. TestIssue2332_TenEventsRunTenTimesOneAtATime (test/acceptance/issue_2332_test.go) asserts ten runs with ten distinct event ids, each succeeded, and no longer compares the started_at and finished_at of different runs. A run's started_at is its claim transaction's NOW(), taken before the claim waits on idx_script_runs_queued_running for the previous run's finish to commit, so two serial runs' stamps crossed by 0.55 ms on E2E Nightly run 40601346075 with no overlap. The comment names the index that enforces one running run and TestRealDB_AQueuedRunWaitsForTheRunningOne, which proves it. Closes #2347
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2348 +/- ##
==========================================
- Coverage 94.81% 94.80% -0.01%
==========================================
Files 1443 1443
Lines 117111 117111
==========================================
- Hits 111033 111030 -3
- Misses 6058 6061 +3
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
test/acceptance/issue_2332_test.go:TestIssue2332_TenEventsRunTenTimesOneAtATimechecks each run's outcome instead of comparing the timestamps of different runs. It was the only failure in E2E Nightly run 40601346075 on 82fe75f (11 of 12 jobs passed).Why
The failure read
run 1 started at 23:49:05.200296, before the one before it ended at 23:49:05.200845. No two runs overlapped:idx_script_runs_queued_running(migration 000205) allows onerunningrow per script.TestRealDB_AQueuedRunWaitsForTheRunningOneproves it against a real PostgreSQL.Claimstampsstarted_at = NOW()(internal/platform/scriptstore/runs.go:415).NOW()is the moment the claim transaction began. That is before the claim waits on the index for the previous run's finish (finished_at = NOW(),runs.go:462) to commit.What changes
succeeded, and names any run that ended otherwise with its error.sortimport it used.The release gate is unchanged: a red E2E Nightly still refuses a final tag.
Verification
make acceptance ISSUE=2332on the local stack: all threeTestIssue2332_*criteria pass, recorded atbuild/2332/acceptance.jsonl.go vet -tags=integration ./test/acceptance/: ok.This PR changes
issue_2332_test.go, so its CI runsAcceptance (changed criteria)for #2332 on a fresh Linux stack (#2341).Closes #2347