Skip to content

Commit

Permalink
sql: unskip Insights test
Browse files Browse the repository at this point in the history
This test has been flaky for a while because of the async tagging
of the TransactionID to the insight that somtimes takes too long to
complete. This change removes that check and unskips the test so that
we can catch regressions for this feature. In the future we may want
to write a separate test to verify the async transactionID tagging
separately.

Resolves: cockroachdb#125771
Resolves: cockroachdb#121986

Epic: None
Release note: None
  • Loading branch information
dhartunian committed Jul 1, 2024
1 parent 053bc17 commit 0c15a91
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/sql/sqlstats/insights/integration/insights_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,6 @@ func TestInsightsIntegrationForContention(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

skip.WithIssue(t, 121986)

// Start the cluster. (One node is sufficient; the outliers system is currently in-memory only.)
ctx := context.Background()
settings := cluster.MakeTestingClusterSettings()
Expand Down Expand Up @@ -766,13 +764,11 @@ func TestInsightsIntegrationForContention(t *testing.T) {
// lookup this id will result in the resolver potentially missing the event.
txnIDCache := tc.ApplicationLayer(0).SQLServer().(*sql.Server).GetTxnIDCache()
txnIDCache.DrainWriteBuffer()
var expectedWaitingTxnFingerprintID appstatspb.TransactionFingerprintID
testutils.SucceedsSoon(t, func() error {
waitingTxnFingerprintID, ok := txnIDCache.Lookup(waitingTxnID)
if !ok || waitingTxnFingerprintID == appstatspb.InvalidTransactionFingerprintID {
return fmt.Errorf("waiting txn fingerprint not found in cache")
}
expectedWaitingTxnFingerprintID = waitingTxnFingerprintID
return nil
})

Expand Down Expand Up @@ -849,11 +845,6 @@ func TestInsightsIntegrationForContention(t *testing.T) {
continue
}

if waitingTxnFingerprintID == "0000000000000000" || waitingTxnFingerprintID == "" {
lastErr = fmt.Errorf("expected waitingTxnFingerprintID to be %d, but got %s. \nScanned row: \n%s", expectedWaitingTxnFingerprintID, waitingTxnFingerprintID, prettyPrintRow)
continue
}

foundRow = true
break
}
Expand Down

0 comments on commit 0c15a91

Please sign in to comment.