Skip to content

Commit 9dcc288

Browse files
committed
test: application reply listener
1 parent 5d923a7 commit 9dcc288

File tree

40 files changed

+223
-110
lines changed

40 files changed

+223
-110
lines changed

acceptance/async-tests/src/test/java/org/reactivecommons/test/CommandsProcessPerfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class CommandsProcessPerfTest {
3939

4040

4141
@Test
42-
public void commandShouldArrive() throws InterruptedException {
42+
void commandShouldArrive() throws InterruptedException {
4343
final long init_p = System.currentTimeMillis();
4444
createMessages(messageCount);
4545
final long end_p = System.currentTimeMillis() - init_p;

acceptance/async-tests/src/test/java/org/reactivecommons/test/DirectGatewayPerfTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class DirectGatewayPerfTest {
3535

3636

3737
@Test
38-
public void shouldSendInOptimalTime() throws InterruptedException {
38+
void shouldSendInOptimalTime() throws InterruptedException {
3939
final Flux<Command<DummyMessage>> messages = createMessages(messageCount);
4040
final Flux<Void> target = messages.flatMap(dummyMessageCommand ->
4141
gateway.sendCommand(dummyMessageCommand, appName)
@@ -50,17 +50,17 @@ public void shouldSendInOptimalTime() throws InterruptedException {
5050
}
5151

5252
@Test
53-
public void shouldSendBatchInOptimalTime4Channels() throws InterruptedException {
53+
void shouldSendBatchInOptimalTime4Channels() throws InterruptedException {
5454
shouldSendBatchInOptimalTimeNChannels(4);
5555
}
5656

5757
@Test
58-
public void shouldSendBatchInOptimalTime2Channels() throws InterruptedException {
58+
void shouldSendBatchInOptimalTime2Channels() throws InterruptedException {
5959
shouldSendBatchInOptimalTimeNChannels(2);
6060
}
6161

6262
@Test
63-
public void shouldSendBatchInOptimalTime1Channel() throws InterruptedException {
63+
void shouldSendBatchInOptimalTime1Channel() throws InterruptedException {
6464
shouldSendBatchInOptimalTimeNChannels(1);
6565
}
6666

acceptance/async-tests/src/test/java/org/reactivecommons/test/DynamicRegistryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class DynamicRegistryTest {
3434
private String appName;
3535

3636
@Test
37-
public void shouldReceiveResponse() {
37+
void shouldReceiveResponse() {
3838
UnicastProcessor<String> result = UnicastProcessor.create();
3939
EventHandler<String> fn = message -> fromRunnable(() -> result.onNext(message.getData()));
4040

acceptance/async-tests/src/test/java/org/reactivecommons/test/QueryProcessPerfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class QueryProcessPerfTest {
4343

4444

4545
@Test
46-
public void serveQueryPerformanceTest() throws InterruptedException {
46+
void serveQueryPerformanceTest() throws InterruptedException {
4747
final Flux<AsyncQuery<DummyMessage>> messages = createMessages(messageCount);
4848

4949
final long init = System.currentTimeMillis();

acceptance/async-tests/src/test/java/org/reactivecommons/test/SimpleDirectCommunicationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class SimpleDirectCommunicationTest {
4242
private Long data = ThreadLocalRandom.current().nextLong();
4343

4444
@Test
45-
public void commandShouldArrive() {
45+
void commandShouldArrive() {
4646
Command<Long> command = new Command<>(COMMAND_NAME, commandId, data);
4747
gateway.sendCommand(command, appName).subscribe();
4848

@@ -53,7 +53,7 @@ public void commandShouldArrive() {
5353
}
5454

5555
@Test
56-
public void shouldReceiveResponse() {
56+
void shouldReceiveResponse() {
5757
final Mono<Integer> reply = gateway.requestReply(new AsyncQuery<>("double", 42), appName, Integer.class);
5858
StepVerifier.create(reply.timeout(Duration.ofSeconds(15)))
5959
.expectNext(42*2)

acceptance/async-tests/src/test/java/org/reactivecommons/test/SimpleEventNotificationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class SimpleEventNotificationTest {
3535
private Long data = ThreadLocalRandom.current().nextLong();
3636

3737
@Test
38-
public void shouldReceiveEvent() throws InterruptedException {
38+
void shouldReceiveEvent() throws InterruptedException {
3939
DomainEvent<?> event = new DomainEvent<>(EVENT_NAME, eventId, data);
4040
from(eventBus.emit(event)).subscribe();
4141
StepVerifier.create(listener.take(1)).assertNext(evt ->

acceptance/async-tests/src/test/java/org/reactivecommons/test/perf/BlockingCommandHandlePerfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class BlockingCommandHandlePerfTest {
4343
private Long data = ThreadLocalRandom.current().nextLong();
4444

4545
@Test
46-
public void commandShouldBeHandledInParallel() throws InterruptedException {
46+
void commandShouldBeHandledInParallel() throws InterruptedException {
4747
Flux.range(0, 12).flatMap(i -> {
4848
Command<Long> command = new Command<>(COMMAND_NAME, commandId + 1, data + 1);
4949
return gateway.sendCommand(command, appName);

async/async-commons-api/src/test/java/org/reactivecommons/async/api/HandlerRegistryTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class HandlerRegistryTest {
2323
private String name = "some.event";
2424

2525
@Test
26-
public void shouldListenEventWithTypeInferenceWhenClassInstanceIsUsed() {
26+
void shouldListenEventWithTypeInferenceWhenClassInstanceIsUsed() {
2727
SomeEventHandler eventHandler = new SomeEventHandler();
2828

2929
registry.listenEvent(name, eventHandler);
@@ -78,7 +78,7 @@ void shouldRegisterDynamicEventsHandler() {
7878
}
7979

8080
@Test
81-
public void shouldRegisterNotificationEventListener() {
81+
void shouldRegisterNotificationEventListener() {
8282
registry.listenNotificationEvent(name, message -> Mono.empty(), SomeDataClass.class);
8383
assertThat(registry.getEventNotificationListener()).anySatisfy(listener ->
8484
assertThat(listener.getPath()).isEqualTo(name));
@@ -98,7 +98,7 @@ public void listenEvent() {
9898
}
9999

100100
@Test
101-
public void handleCommandWithTypeInference() {
101+
void handleCommandWithTypeInference() {
102102
SomeCommandHandler handler = new SomeCommandHandler();
103103

104104
registry.handleCommand(name, handler);
@@ -111,28 +111,28 @@ public void handleCommandWithTypeInference() {
111111
}
112112

113113
@Test
114-
public void handleCommandWithoutTypeShouldFail() {
114+
void handleCommandWithoutTypeShouldFail() {
115115
Assertions.assertThrows(
116116
RuntimeException.class,
117117
() -> registry.handleCommand(name, (Command<SomeDataClass> message) -> Mono.empty()));
118118
}
119119

120120
@Test
121-
public void listenEventWithoutTypeShouldFail() {
121+
void listenEventWithoutTypeShouldFail() {
122122
Assertions.assertThrows(
123123
RuntimeException.class,
124124
() -> registry.listenEvent(name, (DomainEvent<SomeDataClass> message) -> Mono.empty()));
125125
}
126126

127127
@Test
128-
public void handleQueryWithoutTypeShouldFail() {
128+
void handleQueryWithoutTypeShouldFail() {
129129
Assertions.assertThrows(
130130
RuntimeException.class,
131131
() -> registry.serveQuery(name, (SomeDataClass query) -> Mono.empty()));
132132
}
133133

134134
@Test
135-
public void handleCommandWithLambda() {
135+
void handleCommandWithLambda() {
136136
registry.handleCommand(name, (Command<SomeDataClass> message) -> Mono.empty(), SomeDataClass.class);
137137

138138
assertThat(registry.getCommandHandlers()).anySatisfy(registered -> {
@@ -144,7 +144,7 @@ public void handleCommandWithLambda() {
144144

145145

146146
@Test
147-
public void serveQueryWithLambda() {
147+
void serveQueryWithLambda() {
148148
registry.serveQuery(name, message -> Mono.empty(), SomeDataClass.class);
149149
assertThat(registry.getHandlers()).anySatisfy(registered -> {
150150
assertThat(registered).extracting(RegisteredQueryHandler::getPath, RegisteredQueryHandler::getQueryClass)
@@ -153,7 +153,7 @@ public void serveQueryWithLambda() {
153153
}
154154

155155
@Test
156-
public void serveQueryWithTypeInference() {
156+
void serveQueryWithTypeInference() {
157157
QueryHandler<SomeDataClass, SomeDataClass> handler = new SomeQueryHandler();
158158
registry.serveQuery(name, handler);
159159
assertThat(registry.getHandlers()).anySatisfy(registered -> {
@@ -164,7 +164,7 @@ public void serveQueryWithTypeInference() {
164164
}
165165

166166
@Test
167-
public void serveQueryDelegate() {
167+
void serveQueryDelegate() {
168168
QueryHandlerDelegate<Void, SomeDataClass> handler = new SomeQueryHandlerDelegate();
169169
registry.serveQuery(name, handler, SomeDataClass.class);
170170
assertThat(registry.getHandlers()).anySatisfy(registered -> {
@@ -174,7 +174,7 @@ public void serveQueryDelegate() {
174174
}
175175

176176
@Test
177-
public void serveQueryDelegateWithLambda() {
177+
void serveQueryDelegateWithLambda() {
178178
registry.serveQuery(name, (from, message) -> Mono.empty(), SomeDataClass.class);
179179
assertThat(registry.getHandlers()).anySatisfy(registered -> {
180180
assertThat(registered).extracting(RegisteredQueryHandler::getPath, RegisteredQueryHandler::getQueryClass)

async/async-commons/src/test/java/org/reactivecommons/async/commons/converters/json/DefaultObjectMapperSupplierTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class DefaultObjectMapperSupplierTest {
1515

1616

1717
@Test
18-
public void shouldMapWithUnknownProperties() throws IOException {
18+
void shouldMapWithUnknownProperties() throws IOException {
1919
ObjectMapper objectMapper = defaultObjectMapperSupplier.get();
2020

2121
SampleClassExtra base = new SampleClassExtra("23", "one", new Date(), 45l);

async/async-commons/src/test/java/org/reactivecommons/async/commons/reply/ReactiveReplyRouterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class ReactiveReplyRouterTest {
1414
private ReactiveReplyRouter replyRouter = new ReactiveReplyRouter();
1515

1616
@Test
17-
public void shouldRouteReply(){
17+
void shouldRouteReply(){
1818
final String uuid = UUID.randomUUID().toString();
1919
final Mono<Message> registered = replyRouter.register(uuid);
2020

@@ -28,7 +28,7 @@ public void shouldRouteReply(){
2828
}
2929

3030
@Test
31-
public void shouldRouteEmptyResponse(){
31+
void shouldRouteEmptyResponse(){
3232
final String uuid = UUID.randomUUID().toString();
3333
final Mono<Message> registered = replyRouter.register(uuid);
3434

@@ -39,7 +39,7 @@ public void shouldRouteEmptyResponse(){
3939
}
4040

4141
@Test
42-
public void shouldDeRegisterProcessor(){
42+
void shouldDeRegisterProcessor(){
4343
final String uuid = UUID.randomUUID().toString();
4444
final Mono<Message> registered = replyRouter.register(uuid);
4545

0 commit comments

Comments
 (0)