Skip to content

Commit

Permalink
FISH-5881: adding changes to test gRPC module distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
breakponchito committed Feb 1, 2022
1 parent c92221d commit 18394a5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
6 changes: 0 additions & 6 deletions grpc/grpc-stubs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- gRPC versions -->
<grpc.version>1.43.1</grpc.version>
<payara.grpc.version>1.0.0-SNAPSHOT</payara.grpc.version>
<protobuf.version>3.19.2</protobuf.version>
</properties>

Expand Down Expand Up @@ -59,11 +58,6 @@
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>fish.payara.extensions</groupId>
<artifactId>grpc</artifactId>
<version>${payara.grpc.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 0 additions & 7 deletions grpc/grpc-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- gRPC versions -->
<grpc.version>1.43.1</grpc.version>
<payara.grpc.version>1.0.0-SNAPSHOT</payara.grpc.version>
<protobuf.version>3.19.2</protobuf.version>
</properties>

Expand Down Expand Up @@ -84,12 +83,6 @@
<version>${grpc.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>fish.payara.extensions</groupId>
<artifactId>grpc</artifactId>
<version>${payara.grpc.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package fish.payara.example.grpc;

import javax.enterprise.inject.spi.CDI;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.util.Set;

public class CustomServletInitializer implements ServletContainerInitializer {

@Override
public void onStartup(Set<Class<?>> c, ServletContext ctx) throws ServletException {
CDI.current().getBeanManager().fireEvent(ctx);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fish.payara.example.grpc.CustomServletInitializer
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class TestGrpc {
public static final String PROTOBUF = "com.google.protobuf:protobuf-java";
public static final String IO_GRPC_API = "io.grpc:grpc-api";
public static final String IO_GRPC_STUB = "io.grpc:grpc-stub";
public static final String PAYARA_GRPC = "fish.payara.extensions:grpc";
public static final String PROTOBUF_JAVA_UTIL = "com.google.protobuf:protobuf-java-util";

private static List<String> listOfLibs;
Expand All @@ -40,7 +39,6 @@ public class TestGrpc {
listOfLibs.add(PROTOBUF);
listOfLibs.add(IO_GRPC_API);
listOfLibs.add(IO_GRPC_STUB);
listOfLibs.add(PAYARA_GRPC);
listOfLibs.add(PROTOBUF_JAVA_UTIL);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void testConcurrentGrpc() throws InterruptedException {
for(int i = 0; i < 5; i++) {
String client = String.format("[Client %s] ", i);
executor.execute(new GrpcClient(client));
Thread.sleep(500);
Thread.sleep(1000);
}
executor.awaitTermination(10, TimeUnit.SECONDS);
Assert.assertTrue(true);
Expand Down

0 comments on commit 18394a5

Please sign in to comment.