Skip to content

Commit

Permalink
[MINOR] fix(test): Fix flaky test for CoordinatorGrpcTest (#2324)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Fix flaky test for CoordinatorGrpcTest

### Why are the changes needed?

Do some efforts to make CI getting more stable.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
  • Loading branch information
maobaolong authored Jan 6, 2025
1 parent 74366d5 commit a669c2b
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ public static void setupServers() throws Exception {
ShuffleServerConf shuffleServerConf = getShuffleServerConf(ServerType.GRPC);
shuffleServerConf.remove(ShuffleServerConf.NETTY_SERVER_PORT.key());
createShuffleServer(shuffleServerConf);
shuffleServerConf.setInteger(
"rss.rpc.server.port", shuffleServerConf.getInteger(ShuffleServerConf.RPC_SERVER_PORT) + 1);
shuffleServerConf.setInteger(
"rss.jetty.http.port", shuffleServerConf.getInteger(ShuffleServerConf.JETTY_HTTP_PORT) + 1);
shuffleServerConf = getShuffleServerConf(ServerType.GRPC);
shuffleServerConf.remove(ShuffleServerConf.NETTY_SERVER_PORT.key());
createShuffleServer(shuffleServerConf);
startServers();
}
Expand Down Expand Up @@ -161,8 +159,9 @@ public void getShuffleAssignmentsTest() throws Exception {
withEnvironmentVariables("RSS_ENV_KEY", storageTypeJsonSource)
.execute(
() -> {
shuffleServerConf.remove(ShuffleServerConf.NETTY_SERVER_PORT.key());
ShuffleServer ss = new ShuffleServer((ShuffleServerConf) shuffleServerConf);
ShuffleServerConf tempShuffleServerConf = getShuffleServerConf(ServerType.GRPC);
tempShuffleServerConf.remove(ShuffleServerConf.NETTY_SERVER_PORT.key());
ShuffleServer ss = new ShuffleServer(tempShuffleServerConf);
ss.start();
grpcShuffleServers.set(0, ss);
});
Expand Down Expand Up @@ -304,11 +303,7 @@ public void shuffleServerHeartbeatTest() throws Exception {
assertEquals(StorageStatus.NORMAL, infoHead.getStatus());
assertTrue(node.getTags().contains(Constants.SHUFFLE_SERVER_VERSION));
assertTrue(scm.getTagToNodes().get(Constants.SHUFFLE_SERVER_VERSION).contains(node));
ShuffleServerConf shuffleServerConf = grpcShuffleServers.get(0).getShuffleServerConf();
shuffleServerConf.setInteger(
"rss.rpc.server.port", shuffleServerConf.getInteger(ShuffleServerConf.RPC_SERVER_PORT) + 2);
shuffleServerConf.setInteger(
"rss.jetty.http.port", shuffleServerConf.getInteger(ShuffleServerConf.JETTY_HTTP_PORT) + 1);
ShuffleServerConf shuffleServerConf = getShuffleServerConf(ServerType.GRPC);
shuffleServerConf.set(ShuffleServerConf.STORAGE_MEDIA_PROVIDER_ENV_KEY, "RSS_ENV_KEY");
String baseDir = shuffleServerConf.get(ShuffleServerConf.RSS_STORAGE_BASE_PATH).get(0);
String storageTypeJsonSource = String.format("{\"%s\": \"ssd\"}", baseDir);
Expand Down

0 comments on commit a669c2b

Please sign in to comment.