Skip to content

Commit

Permalink
fix ci fail
Browse files Browse the repository at this point in the history
  • Loading branch information
lishanglin committed Dec 21, 2023
1 parent a864855 commit 30136be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.LinkedList;
Expand Down Expand Up @@ -82,8 +83,8 @@ public void testSingleThreadProcess() throws Exception {
partialSuccessState.getStateActionState().tryAction();

waitConditionUntilTimeOut(() -> retryCnt.get() >= failCnt);
verify(migrationCluster).updateStat(isA(MigrationPublishState.class));
verify(migrationCluster).process();
verify(migrationCluster, Mockito.timeout(3000).times(1)).updateStat(isA(MigrationPublishState.class));
verify(migrationCluster, Mockito.timeout(3000).times(1)).process();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
FakeRedisRdbDumpLong.class,
RateLimitTest.class,
})
public class AllTests {
public class AllRateLimitTests {

}
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ public void testBackupDcActiveKeeper_DrMigration_ShouldLimit() throws Exception
redisKeeperServer1.getRedisKeeperServerState().becomeActive(new DefaultEndPoint("127.0.0.1", redisKeeperServer2.getListeningPort()));

waitRedisKeeperServerConnected(redisKeeperServer1);
waitConditionUntilTimeOut(()->assertSuccess(()->{
verify(leakyBucket, times(1)).tryAcquire();
verify(leakyBucket, times(1)).release();
}));
verify(leakyBucket, timeout(5000).times(1)).tryAcquire();
verify(leakyBucket, timeout(5000).times(1)).tryAcquire();
}


Expand Down

0 comments on commit 30136be

Please sign in to comment.