18
18
19
19
import java .lang .reflect .Constructor ;
20
20
import java .nio .charset .StandardCharsets ;
21
- import java .util .Arrays ;
22
21
import java .util .concurrent .CountDownLatch ;
23
22
import java .util .concurrent .TimeUnit ;
24
23
@@ -83,7 +82,7 @@ void testV3ClientManagerStarted() throws Exception {
83
82
}
84
83
85
84
@ Test
86
- void testV3ClientManagerRuntime () throws Exception {
85
+ void testV3ClientManagerRuntime () throws Exception {
87
86
testSubscribeAndPublishRuntime (Mqttv3ConfigRuntime .class , Mqttv3ConfigRuntime .TOPIC_NAME ,
88
87
Mqttv3ConfigRuntime .subscribedLatch , Mqttv3ConfigRuntime .adapter );
89
88
}
@@ -101,7 +100,7 @@ void testV5ClientManagerStarted() throws Exception {
101
100
}
102
101
103
102
@ Test
104
- void testV5ClientManagerRuntime () throws Exception {
103
+ void testV5ClientManagerRuntime () throws Exception {
105
104
testSubscribeAndPublishRuntime (Mqttv5ConfigRuntime .class , Mqttv5ConfigRuntime .TOPIC_NAME ,
106
105
Mqttv5ConfigRuntime .subscribedLatch , Mqttv5ConfigRuntime .adapter );
107
106
}
@@ -144,7 +143,7 @@ private void testSubscribeAndPublishRuntime(Class<?> configClass, String topicNa
144
143
Class <?>[] parameterTypes = {ClientManager .class , String [].class };
145
144
Constructor <?> declaredConstructor = adapter .getConstructor (parameterTypes );
146
145
flowContext .registration (IntegrationFlow
147
- .from ((MessageProducerSupport ) declaredConstructor .newInstance (clientManager ,new String [] {topicName }))
146
+ .from ((MessageProducerSupport ) declaredConstructor .newInstance (clientManager , new String [] {topicName }))
148
147
.channel (output )
149
148
.get ()).register ();
150
149
String testPayload = "foo" ;
@@ -277,6 +276,7 @@ public IntegrationFlow mqttInFlow(Mqttv3ClientManager mqttv3ClientManager) {
277
276
}
278
277
279
278
}
279
+
280
280
@ Configuration
281
281
@ EnableIntegration
282
282
public static class Mqttv3ConfigRuntime {
@@ -297,7 +297,7 @@ public Mqttv3ClientManager mqttv3ClientManager() {
297
297
MqttConnectOptions connectionOptions = new MqttConnectOptions ();
298
298
connectionOptions .setServerURIs (new String [] {MosquittoContainerTest .mqttUrl ()});
299
299
connectionOptions .setAutomaticReconnect (true );
300
- return new Mqttv3ClientManager (connectionOptions , "client-manager-client-id-v3" );
300
+ return new Mqttv3ClientManager (connectionOptions , "client-manager-client-id-v3" );
301
301
}
302
302
303
303
@ Bean
@@ -411,6 +411,7 @@ public IntegrationFlow mqttInFlow(Mqttv5ClientManager mqttv5ClientManager) {
411
411
}
412
412
413
413
}
414
+
414
415
@ Configuration
415
416
@ EnableIntegration
416
417
public static class Mqttv5ConfigRuntime {
0 commit comments