Skip to content

Commit

Permalink
*: fix unstable test TestIndexMergeReaderClose (#43273)
Browse files Browse the repository at this point in the history
close #43272
  • Loading branch information
hawkingrei authored Apr 21, 2023
1 parent f2760fb commit f8445e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions executor/seqtest/seq_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,15 @@ func TestIndexMergeReaderClose(t *testing.T) {
err := tk.QueryToErr("select /*+ USE_INDEX_MERGE(t, idx1, idx2) */ * from t where a > 10 or b < 100")
require.NoError(t, failpoint.Disable("github.com/pingcap/tidb/executor/startPartialIndexWorkerErr"))
require.Error(t, err)
require.False(t, checkGoroutineExists("fetchLoop"))
require.False(t, checkGoroutineExists("fetchHandles"))
require.False(t, checkGoroutineExists("waitPartialWorkersAndCloseFetchChan"))
require.Eventually(t, func() bool {
return !checkGoroutineExists("fetchLoop")
}, 5*time.Second, 100*time.Microsecond)
require.Eventually(t, func() bool {
return !checkGoroutineExists("fetchHandles")
}, 5*time.Second, 100*time.Microsecond)
require.Eventually(t, func() bool {
return !checkGoroutineExists("waitPartialWorkersAndCloseFetchChan")
}, 5*time.Second, 100*time.Microsecond)
}

func TestParallelHashAggClose(t *testing.T) {
Expand Down

0 comments on commit f8445e7

Please sign in to comment.