Skip to content

Commit 9293962

Browse files
authored
Fixed ITs for ExecuteOnTest (#885)
1 parent 7feb218 commit 9293962

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

services/src/test/java/io/scalecube/services/ExecuteOnTest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package io.scalecube.services;
22

3+
import static org.hamcrest.MatcherAssert.assertThat;
4+
import static org.hamcrest.Matchers.startsWith;
35
import static org.junit.jupiter.api.Assertions.assertEquals;
46
import static org.junit.jupiter.api.Assertions.assertTrue;
57

@@ -161,16 +163,16 @@ void testDefaultSchedulersOnMethods() {
161163
final var api = microservices.call().api(DefaultSchedulerOnServiceMethod.class);
162164

163165
api.parallel().block();
164-
assertEquals("parallel-1", service.threadName.get(), "threadName");
166+
assertThat(service.threadName.get(), startsWith("parallel"));
165167

166168
api.single().block();
167-
assertEquals("single-1", service.threadName.get(), "threadName");
169+
assertThat(service.threadName.get(), startsWith("single"));
168170

169171
api.boundedElastic().block();
170-
assertEquals("boundedElastic-1", service.threadName.get(), "threadName");
172+
assertThat(service.threadName.get(), startsWith("boundedElastic"));
171173

172174
api.immediate().block();
173-
assertEquals("main", service.threadName.get(), "threadName");
175+
assertThat(service.threadName.get(), startsWith("main"));
174176
}
175177
}
176178

@@ -182,7 +184,7 @@ void testDefaultSchedulersOnService() {
182184
final var api = microservices.call().api(DefaultSchedulerOnService.class);
183185

184186
api.hello().block();
185-
assertEquals("single-1", service.threadName.get(), "threadName");
187+
assertThat(service.threadName.get(), startsWith("single"));
186188
}
187189
}
188190

0 commit comments

Comments
 (0)