11package io .scalecube .services ;
22
3+ import static org .hamcrest .MatcherAssert .assertThat ;
4+ import static org .hamcrest .Matchers .startsWith ;
35import static org .junit .jupiter .api .Assertions .assertEquals ;
46import 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