Skip to content

Commit

Permalink
Fix various IT modules and add them to the CI matrices
Browse files Browse the repository at this point in the history
- Fix the gRPC Test Random Port IT (cannot use injection)
- Fix the virtual thread webauthn IT (cannot use injection)
- Fix the opentelemetry redis instrumentation IT (still unable to retrieve the exception)
  • Loading branch information
cescoffier committed Apr 12, 2024
1 parent 051e910 commit 2e9b8ff
Show file tree
Hide file tree
Showing 20 changed files with 123 additions and 608 deletions.
10 changes: 5 additions & 5 deletions .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
{
"category": "HTTP",
"timeout": 110,
"test-modules": "elytron-resteasy, resteasy-jackson, elytron-resteasy-reactive, resteasy-mutiny, resteasy-reactive-kotlin/standard, vertx, vertx-http, vertx-web, vertx-web-jackson, vertx-graphql, virtual-http, rest-client, rest-client-reactive, rest-client-reactive-stork, rest-client-reactive-multipart, websockets, management-interface, management-interface-auth",
"test-modules": "elytron-resteasy, resteasy-jackson, elytron-resteasy-reactive, resteasy-mutiny, resteasy-reactive-kotlin/standard, vertx, vertx-http, vertx-web, vertx-web-jackson, vertx-graphql, virtual-http, rest-client, rest-client-reactive, rest-client-reactive-stork, rest-client-reactive-multipart, websockets, management-interface, management-interface-auth, mutiny-native-jctools",
"os-name": "ubuntu-latest"
},
{
Expand All @@ -116,8 +116,8 @@
},
{
"category": "Misc4",
"timeout": 125,
"test-modules": "picocli-native, gradle, micrometer-mp-metrics, micrometer-prometheus, logging-json, jaxp, jaxb, opentelemetry, opentelemetry-jdbc-instrumentation, webjars-locator",
"timeout": 130,
"test-modules": "picocli-native, gradle, micrometer-mp-metrics, micrometer-prometheus, logging-json, jaxp, jaxb, opentelemetry, opentelemetry-jdbc-instrumentation, opentelemetry-redis-instrumentation, webjars-locator",
"os-name": "ubuntu-latest"
},
{
Expand All @@ -128,8 +128,8 @@
},
{
"category": "gRPC",
"timeout": 75,
"test-modules": "grpc-health, grpc-interceptors, grpc-mutual-auth, grpc-plain-text-gzip, grpc-plain-text-mutiny, grpc-proto-v2, grpc-streaming, grpc-tls, grpc-tls-p12",
"timeout": 80,
"test-modules": "grpc-health, grpc-interceptors, grpc-mutual-auth, grpc-plain-text-gzip, grpc-plain-text-mutiny, grpc-proto-v2, grpc-streaming, grpc-tls, grpc-tls-p12, grpc-test-random-port",
"os-name": "ubuntu-latest"
},
{
Expand Down
6 changes: 6 additions & 0 deletions .github/virtual-threads-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"timeout": 45,
"test-modules": "amqp-virtual-threads, jms-virtual-threads, kafka-virtual-threads",
"os-name": "ubuntu-latest"
},
{
"category": "Security",
"timeout": 20,
"test-modules": "security-webauthn-virtual-threads",
"os-name": "ubuntu-latest"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
package io.quarkus.grpc.examples.hello;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

import com.google.common.net.HostAndPort;

import examples.GreeterGrpc;
import examples.HelloRequest;
import io.grpc.netty.NettyChannelBuilder;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;

@QuarkusIntegrationTest
@TestProfile(RandomPortSeparateServerPlainTestBase.Profile.class)
class RandomPortSeparateServerPlainIT extends RandomPortSeparateServerPlainTestBase {

@Test
void testWithNative() {
var channel = NettyChannelBuilder.forAddress("localhost", 9000).usePlaintext().build();
var stub = GreeterGrpc.newBlockingStub(channel);
HelloRequest request = HelloRequest.newBuilder().setName("neo").build();
var resp = stub.sayHello(request);
assertThat(resp.getMessage()).startsWith("Hello neo");

int clientPort = HostAndPort.fromString(channel.authority()).getPort();
assertThat(clientPort).isNotEqualTo(0);
assertThat(clientPort).isEqualTo(9000);

channel.shutdownNow();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import examples.MutinyGreeterGrpc.MutinyGreeterStub;
import io.grpc.Channel;
import io.quarkus.grpc.GrpcClient;
import io.quarkus.test.junit.DisabledOnIntegrationTest;

abstract class RandomPortTestBase {
@GrpcClient("hello")
Expand All @@ -21,6 +22,7 @@ abstract class RandomPortTestBase {
Channel channel;

@Test
@DisabledOnIntegrationTest
void testRandomPort() {
assertSoftly(softly -> {
HelloRequest request = HelloRequest.newBuilder().setName("neo").build();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
package io.quarkus.grpc.examples.hello;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

import com.google.common.net.HostAndPort;

import examples.GreeterGrpc;
import examples.HelloRequest;
import io.grpc.netty.NettyChannelBuilder;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;

@QuarkusIntegrationTest
@TestProfile(RandomPortVertxServerPlainTestBase.Profile.class)
class RandomPortVertxServerPlainIT extends RandomPortVertxServerPlainTestBase {

@Test
void testWithNative() {
var channel = NettyChannelBuilder.forAddress("localhost", 8081).usePlaintext().build();
var stub = GreeterGrpc.newBlockingStub(channel);
HelloRequest request = HelloRequest.newBuilder().setName("neo").build();
var resp = stub.sayHello(request);
assertThat(resp.getMessage()).startsWith("Hello neo");

int clientPort = HostAndPort.fromString(channel.authority()).getPort();
assertThat(clientPort).isNotEqualTo(0);
assertThat(clientPort).isEqualTo(8081);

channel.shutdownNow();
}
}

This file was deleted.

Loading

0 comments on commit 2e9b8ff

Please sign in to comment.