Skip to content

Commit 5c0dabc

Browse files
craig[bot]miraradeva
andcommitted
Merge #160269
160269: kvserver: skip TestWriteLoadStatsAccounting under deadlock r=wenyihu6 a=miraradeva In a recent failure, this test cleared a replica's load stats and later asserted they are 0. However, a request raced in and resulted in the assertion failing. This commit skips the test under deadlock. Fixes: #160265 Release note: None Co-authored-by: Mira Radeva <mira@cockroachlabs.com>
2 parents 2b9d89f + 8cfb1fd commit 5c0dabc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/kv/kvserver/replica_rankings_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/cockroachdb/cockroach/pkg/storage"
2626
"github.com/cockroachdb/cockroach/pkg/testutils"
2727
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
28+
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
2829
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
2930
"github.com/cockroachdb/cockroach/pkg/testutils/storageutils"
3031
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
@@ -214,8 +215,12 @@ func assertGreaterThanInDelta(t *testing.T, expected float64, actual float64, de
214215
func TestWriteLoadStatsAccounting(t *testing.T) {
215216
defer leaktest.AfterTest(t)()
216217
defer log.Scope(t).Close(t)
217-
ctx := context.Background()
218218

219+
// This test is known to flake. E.g. in #160265, a request raced in after
220+
// clearing the load stats and before asserting they are 0.
221+
skip.UnderDeadlock(t, "timing sensitive")
222+
223+
ctx := context.Background()
219224
args := base.TestClusterArgs{
220225
ReplicationMode: base.ReplicationManual,
221226
}

0 commit comments

Comments
 (0)