-
Notifications
You must be signed in to change notification settings - Fork 2k
[DX-4017] [DX-3716] Core Test Timeout Fix #22281
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
Open
kalverra
wants to merge
32
commits into
develop
Choose a base branch
from
coreTestTimeoutFix
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
a44d16a
Add skill and improve test harness
kalverra 5269871
Simplify
kalverra 94ff75a
claude skills
kalverra 6ad0195
comments
kalverra 91e3898
lint
kalverra 704bbca
README
kalverra e7261b2
Fix file paths
kalverra 6816278
Fix paths
kalverra e91fb01
Protect timeout
kalverra 9976c73
Fix color tests for AI terminals
kalverra 23c139c
More flexible --fail-fast
kalverra d16e814
Update skill
kalverra e4174f9
Comments
kalverra 763dc05
Merge branch 'chainlinkTestDiagnosis' of github.com:smartcontractkit/…
kalverra dcbe745
Fix TestPruningLoop_Exits
kalverra 1e26ae5
lint
kalverra 18f12bc
more focused fix
kalverra d74cc4d
lint
kalverra d7bc17e
skill
kalverra 3217a2d
test fix
kalverra 4fe2fbf
restore deadline timeout
kalverra 60b90c2
custom timeout
kalverra 5834061
timeout test
kalverra b46a73c
Fix heartbeat
kalverra 9c3596f
Fix vrf/v2 package flakes
kalverra 191f4df
symlink
kalverra eac3f11
Comments
kalverra 4253fcf
Prevent masking errors
kalverra 4fc6ab4
std errors
kalverra 46af379
Comments
kalverra c6a621e
Fix contract parsing
kalverra 712758f
Revert contract checks
kalverra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package testutils | ||
|
|
||
| import ( | ||
| "testing" | ||
| "time" | ||
|
|
||
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestWaitTimeoutUsesDeadlineBudgetNotDefaultCap(t *testing.T) { | ||
| if d, ok := t.Deadline(); ok { | ||
| expectBefore := time.Until(d) * 9 / 10 | ||
| got := WaitTimeout(t) | ||
| expectAfter := time.Until(d) * 9 / 10 | ||
| require.Greater(t, got, time.Duration(0)) | ||
| // got uses time.Until(deadline) inside WaitTimeout between these snapshots | ||
| require.GreaterOrEqual(t, got, expectAfter) | ||
| require.LessOrEqual(t, got, expectBefore) | ||
| } else { | ||
| require.Equal(t, DefaultWaitTimeout, WaitTimeout(t)) | ||
| } | ||
| } | ||
|
|
||
| func TestWaitTimeoutCustom(t *testing.T) { | ||
| requested := 10 * time.Second | ||
|
|
||
| if d, ok := t.Deadline(); ok { | ||
| expectBefore := time.Until(d) * 9 / 10 | ||
| got := WaitTimeoutCustom(t, requested) | ||
| expectAfter := time.Until(d) * 9 / 10 | ||
| require.Greater(t, got, time.Duration(0)) | ||
| require.LessOrEqual(t, got, requested) | ||
| require.GreaterOrEqual(t, got, min(expectAfter, requested)) | ||
| require.LessOrEqual(t, got, min(expectBefore, requested)) | ||
| } else { | ||
| require.Equal(t, requested, WaitTimeoutCustom(t, requested)) | ||
| } | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Doesn't this change the logic of
WaitTimeout? It used to alway prefer 90% no matter how that compared to the default. Now it would return the default instead if that were shorter, but that will artificially limit tests that we want to use 90%.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.
Ya. My thought was "let's force people to use cleaner timeouts" but I'm realizing that's pretty heavy-handed and unrealistic in this case.
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.
I think it would re-introduce a lot of chaos. Switching from static, artificially short timeouts over to these dynamic extended ones was a big win originally. I think we've only increased concurrency and non-determinism since then.
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.
I see that logic is still in this version. Why is it better to quit early, when the suite is configured to run longer? Scaling to that limit is a feature - e.g. What if I have an older machine? Am I expected to edit the code to get tests to pass?