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

[TT-3972] Mark/skip problematic tests, resolve some root issues #4035

Merged
merged 55 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
24932ee
Improve CI tests
titpetric May 5, 2022
76a14d1
Add testing utilities to mark Flaky and Racy tests with
titpetric May 5, 2022
fc35c50
Allow configuring python version for tests
titpetric May 5, 2022
c79bef1
Add debug output to print which python version we seek
titpetric May 5, 2022
92e0f05
Remove dead code, verified with @sredny
titpetric May 5, 2022
30e5d49
Mark TT-5220 flaky test
titpetric May 5, 2022
7efb73d
Mark TT-5222 flaky test
titpetric May 5, 2022
fc2f314
Mark TT-5223 flaky test
titpetric May 5, 2022
6833866
Resolve TT-5000, add cancellation ctx to redis to fix some racy tests
titpetric May 5, 2022
b964934
Mark TT-5224 as racy
titpetric May 5, 2022
65e9b15
Mark TT-5225 as racy
titpetric May 5, 2022
0ddb19d
Add http client/transport utilities to avoid net.DefaultResolver
titpetric May 5, 2022
f8fdcc0
Fix: TT-5112 only replace defaultResolver once
titpetric May 5, 2022
09922ab
Use NewClientLocal where we know we have flaky tests caused by the DN…
titpetric May 5, 2022
ead46d9
Tentative improvement for TT-5226, marking flaky tests
titpetric May 5, 2022
dbab055
Fix TT-5227 by having a dirty dns mock shutdown
titpetric May 5, 2022
9ee65d9
Mark TT-5228 as flaky
titpetric May 5, 2022
c2c7988
add test util function GetPythonVersion
jeffy-mathew May 6, 2022
b198ab0
Mark TT-3973 as flaky
jeffy-mathew May 6, 2022
f944968
mark TT-4069 as flaky
jeffy-mathew May 6, 2022
0b86a91
fix flaky TT-4788
jeffy-mathew May 6, 2022
de292b2
Mark TT-5233 as racy
jeffy-mathew May 6, 2022
ecb8908
mark TestHMACAuthSessionSHA512Pass as flaky TT-3973
jeffy-mathew May 6, 2022
5eb8436
Allow passing options to bin/ci-tests.sh for go test
titpetric May 6, 2022
c5eaabc
Print notice test can be skipped with CI env
titpetric May 6, 2022
cb37640
Remove unnecessary go background key deletion, race over b.store
titpetric May 6, 2022
3b15d3d
Upgrade redis/v8 to get patches for all the data races
titpetric May 6, 2022
df039db
Mark TT-5236 as flaky
titpetric May 6, 2022
1e10642
Fix goroutine leak in rpcReloadLoop
titpetric May 7, 2022
69cc465
Fix: panic in tests if we can't connect to redis
titpetric May 7, 2022
58c8164
Testing: add a console monitor for runtime stats, goroutines
titpetric May 7, 2022
54856f3
Add flaky test to verify how many goroutines we leak in a test case
titpetric May 7, 2022
1fdcef9
Remove running go-vet, it's run twice as part of golangci-lint
titpetric May 9, 2022
342fe8b
Mark TT-5249 as flaky
titpetric May 9, 2022
3c740f3
Mark flaky tests TT-5250, TT-5251
titpetric May 9, 2022
9fc7ecd
Remove unused *gateway.cancelFn
titpetric May 9, 2022
6cb00d7
Mark TT-5254 flaky test
titpetric May 9, 2022
366affe
Mark TT-5257 as flaky, note frequency
titpetric May 9, 2022
a1d1fbc
Mark TT-5258 as flaky
titpetric May 9, 2022
8422164
Mark TT-5259 as flaky
titpetric May 9, 2022
07a5de2
Mark TT-5260 flaky, improve tests fragility
titpetric May 9, 2022
923ef6b
Fix: Improve flakyness in Gateway tests
titpetric May 9, 2022
8a964b3
Mark TT-5112, 5261, 5261 as flaky
titpetric May 9, 2022
3279851
Remove unnecessary time.Sleep values from tests, tests still pass
titpetric May 9, 2022
eef2662
Add enabling of pprof server with TEST_PPROF_ENABLE and TEST_PPROF_AD…
titpetric May 9, 2022
eff6055
Improve TestAPISpec_StripListenPath flakyness, Mark TT-5255 as flaky
titpetric May 9, 2022
6ac674b
Mark TT-5263 as flaky
titpetric May 9, 2022
1991beb
Mark flaky tests, remove SkipEmptyRedis
titpetric May 9, 2022
75e8c03
Mark TT-5264 as flaky
titpetric May 9, 2022
ca655cf
Test utilities improvements (signficant):
titpetric May 9, 2022
aee09f0
Fix leaking pubsub channels, decrease deprecated redis api surface to…
titpetric May 9, 2022
171d9f3
Fix golangci-lint reported issues in modified code
titpetric May 9, 2022
99bd4cf
Fix resource leak with time.After in tests, analytics records flusher
titpetric May 10, 2022
465d542
Removed TestAnalytics, fixing incorrect rebase
titpetric May 17, 2022
e4ddb50
Add comment to explain why func is empty, sonarcloud
titpetric May 17, 2022
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
Prev Previous commit
Next Next commit
Fix resource leak with time.After in tests, analytics records flusher
  • Loading branch information
titpetric committed May 17, 2022
commit 99bd4cfa6cb3b1ee0e1c7820e94324b694992cbf
1 change: 1 addition & 0 deletions gateway/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func (r *RedisAnalyticsHandler) recordWorker() {
}
serliazerSuffix := r.analyticsSerializer.GetSuffix()
analyticKey += serliazerSuffix

readyToSend := false

flushTimer := time.NewTimer(recordsBufferFlushInterval)
Expand Down
15 changes: 13 additions & 2 deletions gateway/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,17 @@ func (r *ReloadMachinery) Queued() bool {
func (r *ReloadMachinery) EnsureQueued(t *testing.T) {
tick := time.NewTicker(time.Millisecond)
defer tick.Stop()

for {
timeout := time.NewTimer(100 * time.Millisecond)

select {
case <-time.After(100 * time.Millisecond):
case <-timeout.C:
t.Fatal("Timedout waiting for reload to be queued")
titpetric marked this conversation as resolved.
Show resolved Hide resolved
case <-tick.C:
if !timeout.Stop() {
<-timeout.C
}
if r.Queued() {
return
}
Expand All @@ -186,10 +192,15 @@ func (r *ReloadMachinery) EnsureReloaded(t *testing.T) {
tick := time.NewTicker(time.Millisecond)
defer tick.Stop()
for {
timeout := time.NewTimer(200 * time.Millisecond)

select {
case <-time.After(200 * time.Millisecond):
case <-timeout.C:
t.Fatal("Timedout waiting for reload to be queued")
case <-tick.C:
if !timeout.Stop() {
<-timeout.C
}
if r.Reloaded() {
return
}
Expand Down