-
Notifications
You must be signed in to change notification settings - Fork 7
fix some common test flakes #63
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,7 +221,7 @@ func TestConnHealthTryDial(t *testing.T) { | |
| require.NoError(t, ln.popConn().Close()) | ||
| require.Eventually(t, func() bool { | ||
| return nd.ConnHealthTryDial(staticNodeID, rpc.DefaultClass) == nil | ||
| }, time.Second, 10*time.Millisecond) | ||
| }, 5*time.Second, 10*time.Millisecond) | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Closing the connection pops the breaker. The lines just above this allow 5 seconds for a popped breaker to recover. So why not here? |
||
| } | ||
|
|
||
| func TestConnHealthInternal(t *testing.T) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1364,13 +1364,6 @@ ALTER TABLE t1 ADD COLUMN b INT DEFAULT 1`, | |
| t.Fatalf("unexpected post commit jobs latency: %v", postCommitJobsInterval.AsFloat64()) | ||
| } | ||
|
|
||
| if tc.expectNonTrivialSchemaChangeTime && postCommitJobsInterval.AsFloat64() < 0.1 { | ||
| t.Fatalf( | ||
| "expected schema changes to take longer than 0.1 seconds, took: %v", | ||
| postCommitJobsInterval.AsFloat64(), | ||
| ) | ||
| } | ||
|
|
||
|
Comment on lines
-1367
to
-1373
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Failing the test because it took less than 100ms to insert and alter 10,000 rows is ridiculous. I think the |
||
| if rows.Next() { | ||
| t.Fatalf("unexpected number of rows returned by last query statistics: %v", err) | ||
| } | ||
|
|
||
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.
Not really sure why this fixes things and it kind of pisses me off. Best I can tell this ends up being
nilif it's not set, so maybe this test never worked properly and any simulated latencies were an accident?