chaokunyang commented on code in PR #3738:
URL: https://github.com/apache/fory/pull/3738#discussion_r3361367755


##########
integration_tests/grpc_tests/java/src/test/java/org/apache/fory/grpc_tests/GrpcInteropTest.java:
##########
@@ -71,7 +71,57 @@ public void testJavaClientPythonServer() throws Exception {
         new PeerOutputCollector(process.getInputStream(), 
"python-grpc-server");
     outputCollector.start();
     try {
-      int port = waitForPort(process, outputCollector, portFile);
+      int port = waitForPort(process, outputCollector, portFile, "Python");
+      ManagedChannel channel =
+          ManagedChannelBuilder.forAddress("127.0.0.1", 
port).usePlaintext().build();
+      try {
+        exerciseFdl(channel);
+        exerciseFbs(channel);
+        exercisePb(channel);
+      } finally {
+        channel.shutdownNow();
+        channel.awaitTermination(10, TimeUnit.SECONDS);
+      }
+    } finally {
+      process.destroy();
+      process.waitFor(10, TimeUnit.SECONDS);
+      if (process.isAlive()) {
+        process.destroyForcibly();
+        process.waitFor(10, TimeUnit.SECONDS);
+      }
+      outputCollector.awaitOutput();
+      Files.deleteIfExists(portFile);
+    }
+  }
+
+  @Test
+  public void testJavaServerRustClient() throws Exception {

Review Comment:
   Please avoid growing this class with one pair of 
`testJavaServer<Lang>Client` / `testJavaClient<Lang>Server` methods per peer 
language. The Java harness can own the two directions once in a base test 
(`Java server -> peer client` and `Java client -> peer server`), while Python 
and Rust subclasses/configs provide the peer command, label, setup/build step, 
and port-file handling they need. That would also let CI split this into 
separate Java/Python and Java/Rust gRPC jobs, gated on compiler/codegen 
changes, instead of hiding Rust coverage inside the existing `Java/Python gRPC 
Tests` job.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to