@@ -130,20 +130,20 @@ describe('pub-sub', function () {
130
130
client . on ( 'p:*' , ( data ) => messages [ '*' ] . push ( ...data . messages ) ) ;
131
131
132
132
await new Promise ( ( resolve ) => {
133
- client . emit ( 'subscribe' , { subscriptions : [ subscription , subscriptionB , pSubscription ] } , async ( ack ) => {
133
+ client . emit ( 'subscribe' , { subscriptions : [ subscription , subscriptionB , pSubscription ] } , ( ack ) => {
134
134
expect ( ack ) . to . eql ( { status : 'ok' } ) ;
135
135
136
136
client . on ( 's:channel-b' , resolve ) ;
137
137
138
- await rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
139
- await rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
140
- await rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
141
- await rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
142
- await rte . data . sendCommand ( 'publish' , [ 'channel-b' , 'message-b' ] ) ;
138
+ rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
139
+ rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
140
+ rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
141
+ rte . data . sendCommand ( 'publish' , [ 'channel-a' , 'message-a' ] ) ;
142
+ rte . data . sendCommand ( 'publish' , [ 'channel-b' , 'message-b' ] ) ;
143
143
} )
144
144
} ) ;
145
145
146
- sleep ( 3000 ) ;
146
+ await sleep ( 3000 ) ;
147
147
148
148
expect ( messages [ 'channel-a' ] . length ) . to . eql ( 4 ) ;
149
149
messages [ 'channel-a' ] . forEach ( message => {
0 commit comments