forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for duplicate services - mutiny and plain; from quarkusio#44326
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/DuplicateServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.quarkus.grpc.server; | ||
Check failure on line 1 in extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/DuplicateServiceTest.java GitHub Actions / Build summary for 29169fa1c168addacb3da20433270057773bfbc4JVM Tests - JDK 17
Raw output
Check failure on line 1 in extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/DuplicateServiceTest.java GitHub Actions / Build summary for 29169fa1c168addacb3da20433270057773bfbc4JVM Tests - JDK 17 Windows
Raw output
Check failure on line 1 in extensions/grpc/deployment/src/test/java/io/quarkus/grpc/server/DuplicateServiceTest.java GitHub Actions / Build summary for 29169fa1c168addacb3da20433270057773bfbc4JVM Tests - JDK 21
Raw output
|
||
|
||
import static org.junit.jupiter.api.Assertions.fail; | ||
|
||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import com.google.protobuf.EmptyProto; | ||
|
||
import io.grpc.testing.integration.Messages; | ||
import io.quarkus.grpc.server.services.BlockingMutinyTestService; | ||
import io.quarkus.grpc.server.services.BlockingTestService; | ||
import io.quarkus.test.QuarkusUnitTest; | ||
|
||
public class DuplicateServiceTest { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest unitTest = new QuarkusUnitTest() | ||
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) | ||
.addPackage(EmptyProto.class.getPackage()) | ||
.addPackage(Messages.SimpleRequest.class.getPackage()) | ||
.addClasses(BlockingTestService.class, | ||
BlockingMutinyTestService.class)) | ||
.assertException(t -> { | ||
System.out.println("t = " + t); | ||
}); | ||
|
||
@Test | ||
void testDuplicateService() { | ||
fail("Should not be called"); | ||
} | ||
|
||
} |