-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
BlockingMutinyIT.java
45 lines (37 loc) · 1.04 KB
/
BlockingMutinyIT.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.example.grpc.hibernate;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import com.example.test.MutinyTestGrpc;
import com.example.test.Test;
import com.example.test.TestClient;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class BlockingMutinyIT extends BlockingMutinyTestBase {
@BeforeAll
static void init() {
GrpcIntegrationTestHelper.init();
}
@AfterAll
static void cleanup() {
GrpcIntegrationTestHelper.cleanup();
}
@AfterEach
void close() {
if (client != null) {
client = null;
}
}
/**
* Native tests cannot get the injected client, thus we build the client directly.
*
* @return the test client
*/
@Override
Test getClient() {
if (client == null) {
client = GrpcIntegrationTestHelper.createClient(9000, TestClient.class, MutinyTestGrpc::newMutinyStub);
}
return client;
}
}