Ensure we use the same GRPC version everywhere (#1137)

* Ensure we use the same GRPC version everywhere

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Fix actors tests assert

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Revert Dapr exception asserts

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Increase sleep to allow Spring Context to bootstrap

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Revert sleep value

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Increase the sleep for messaging test

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Move sleep before each, to ensure Spring context starts

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

* Add more delays to ensure Spring Controller gets the messages

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>

---------

Signed-off-by: Artur Ciocanu <ciocanu@adobe.com>
Co-authored-by: Artur Ciocanu <ciocanu@adobe.com>
This commit is contained in:
artur-ciocanu 2024-09-26 20:41:08 +03:00 committed by GitHub
parent 436b7df427
commit cedaebc157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 9 deletions

View File

@ -104,13 +104,13 @@
<dependency> <dependency>
<groupId>io.grpc</groupId> <groupId>io.grpc</groupId>
<artifactId>grpc-testing</artifactId> <artifactId>grpc-testing</artifactId>
<version>1.56.1</version> <version>${grpc.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.grpc</groupId> <groupId>io.grpc</groupId>
<artifactId>grpc-inprocess</artifactId> <artifactId>grpc-inprocess</artifactId>
<version>1.59.0</version> <version>${grpc.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -18,7 +18,6 @@
<properties> <properties>
<maven.deploy.skip>false</maven.deploy.skip> <maven.deploy.skip>false</maven.deploy.skip>
<grpc.version>1.59.0</grpc.version>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -129,7 +129,7 @@ public class DaprGrpcClientTest {
ExecutionException.class, ExecutionException.class,
"UNKNOWN", "UNKNOWN",
"UNKNOWN: ", "UNKNOWN: ",
() -> result.block()); result::block);
} }
@Test @Test

View File

@ -96,7 +96,7 @@ public class DaprGrpcClientTest {
assertThrowsDaprException( assertThrowsDaprException(
ExecutionException.class, ExecutionException.class,
"UNKNOWN", "UNKNOWN",
"UNKNOWN: ", "UNKNOWN: Application error processing RPC",
result::block); result::block);
} }
@ -112,7 +112,7 @@ public class DaprGrpcClientTest {
assertThrowsDaprException( assertThrowsDaprException(
ExecutionException.class, ExecutionException.class,
"UNKNOWN", "UNKNOWN",
"UNKNOWN: ", "UNKNOWN: Application error processing RPC",
result::block); result::block);
} }
@Test @Test

View File

@ -76,10 +76,15 @@ public class DaprSpringMessagingIT {
private TestRestController testRestController; private TestRestController testRestController;
@BeforeAll @BeforeAll
public static void setup(){ public static void beforeAll(){
org.testcontainers.Testcontainers.exposeHostPorts(8080); org.testcontainers.Testcontainers.exposeHostPorts(8080);
} }
@BeforeEach
public void beforeEach() throws InterruptedException {
Thread.sleep(1000);
}
@Test @Test
public void testDaprMessagingTemplate() throws InterruptedException { public void testDaprMessagingTemplate() throws InterruptedException {
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
@ -97,5 +102,4 @@ public class DaprSpringMessagingIT {
assertThat(events.size()).isEqualTo(10); assertThat(events.size()).isEqualTo(10);
} }
} }

View File

@ -18,7 +18,6 @@
<properties> <properties>
<maven.deploy.skip>false</maven.deploy.skip> <maven.deploy.skip>false</maven.deploy.skip>
<grpc.version>1.59.0</grpc.version>
<argLine> <argLine>
--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
</argLine> </argLine>