diff --git a/pkg/schedule/schedulers/evict_slow_trend_test.go b/pkg/schedule/schedulers/evict_slow_trend_test.go index 834ef337639..dd6807f4a85 100644 --- a/pkg/schedule/schedulers/evict_slow_trend_test.go +++ b/pkg/schedule/schedulers/evict_slow_trend_test.go @@ -105,7 +105,7 @@ func (suite *evictSlowTrendTestSuite) TestEvictSlowTrendBasicFuncs() { re.Equal(slowCandidate{}, es2.conf.evictCandidate) es2.conf.markCandidateRecovered() lastCapturedCandidate = es2.conf.lastCapturedCandidate() - re.Greater(lastCapturedCandidate.recoverTS.Compare(recoverTS), 0) + re.Positive(lastCapturedCandidate.recoverTS.Compare(recoverTS)) re.Equal(lastCapturedCandidate.storeID, store.GetID()) // Test capture another store 2 diff --git a/pkg/statistics/hot_peer_cache_test.go b/pkg/statistics/hot_peer_cache_test.go index c116e020f54..db215238604 100644 --- a/pkg/statistics/hot_peer_cache_test.go +++ b/pkg/statistics/hot_peer_cache_test.go @@ -375,7 +375,7 @@ func TestUpdateHotPeerStat(t *testing.T) { cache.updateStat(newItem[0]) newItem = cache.checkPeerFlow(region, []*metapb.Peer{peer}, deltaLoads, interval) } - re.Less(newItem[0].HotDegree, 0) + re.Negative(newItem[0].HotDegree) re.Equal(0, newItem[0].AntiCount) re.Equal(utils.Remove, newItem[0].actionType) } diff --git a/tests/integrations/client/http_client_test.go b/tests/integrations/client/http_client_test.go index 9e712b808f3..33652da9be0 100644 --- a/tests/integrations/client/http_client_test.go +++ b/tests/integrations/client/http_client_test.go @@ -174,11 +174,11 @@ func (suite *httpClientTestSuite) checkMeta(mode mode, client pd.Client) { re.Equal("INPROGRESS", state) regionStats, err := client.GetRegionStatusByKeyRange(env.ctx, pd.NewKeyRange([]byte("a1"), []byte("a3")), false) re.NoError(err) - re.Greater(regionStats.Count, 0) + re.Positive(regionStats.Count) re.NotEmpty(regionStats.StoreLeaderCount) regionStats, err = client.GetRegionStatusByKeyRange(env.ctx, pd.NewKeyRange([]byte("a1"), []byte("a3")), true) re.NoError(err) - re.Greater(regionStats.Count, 0) + re.Positive(regionStats.Count) re.Empty(regionStats.StoreLeaderCount) hotReadRegions, err := client.GetHotReadRegions(env.ctx) re.NoError(err) diff --git a/tests/integrations/mcs/tso/keyspace_group_manager_test.go b/tests/integrations/mcs/tso/keyspace_group_manager_test.go index f7b892ce77d..25d9516bf63 100644 --- a/tests/integrations/mcs/tso/keyspace_group_manager_test.go +++ b/tests/integrations/mcs/tso/keyspace_group_manager_test.go @@ -300,7 +300,7 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestTSOKeyspaceGroupSplit() { // Check the split TSO from keyspace group `newID` now. splitTS, err := suite.requestTSO(re, 222, newID) re.NoError(err) - re.Greater(tsoutil.CompareTimestamp(&splitTS, &ts), 0) + re.Positive(tsoutil.CompareTimestamp(&splitTS, &ts)) } func (suite *tsoKeyspaceGroupManagerTestSuite) requestTSO( @@ -636,7 +636,7 @@ func (suite *tsoKeyspaceGroupManagerTestSuite) TestTSOKeyspaceGroupMerge() { } return err == nil && tsoutil.CompareTimestamp(&mergedTS, &pdpb.Timestamp{}) > 0 }, testutil.WithTickInterval(5*time.Second), testutil.WithWaitFor(time.Minute)) - re.Greater(tsoutil.CompareTimestamp(&mergedTS, &ts), 0) + re.Positive(tsoutil.CompareTimestamp(&mergedTS, &ts)) } func (suite *tsoKeyspaceGroupManagerTestSuite) TestTSOKeyspaceGroupMergeClient() {