cry-ebus2 3.0.0 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,18 +7,24 @@ import { Broker, DelayWorker } from "../index";
7
7
  describe('services', async function () {
8
8
 
9
9
  this.timeout(4000)
10
+ let client = new Client()
11
+ let echo : any = undefined
10
12
 
11
- new Broker().start()
12
- let echo = new EchoWorker()
13
- echo.start()
14
- new DelayWorker().start()
15
- new DelayWorker().start()
16
- new DelayWorker().start()
13
+ it('should start services', async () => {
14
+
15
+ new Broker().start()
16
+ echo = new EchoWorker()
17
+ echo.start()
18
+ new DelayWorker().start()
19
+ new DelayWorker().start()
20
+ new DelayWorker().start()
21
+ });
17
22
 
18
- let client = new Client()
19
23
 
20
24
  it('should return services', async () => {
21
25
  let rep = await client.services()
26
+ console.log('rep',rep);
27
+
22
28
  expect(rep.find( (n:any) => n.name==="echo").nWorkers).to.eq(1)
23
29
  expect(rep.find( (n:any) => n.name==="delay").nWorkers).to.eq(3)
24
30
 
package/src/worker.ts CHANGED
@@ -173,7 +173,6 @@ export class Worker {
173
173
 
174
174
  let opts = serialize.unpack(optBuff) as Partial<EbusRequestOptions>
175
175
  log.debug(`worker for ${this.service} received request ${type} with opts`, opts)
176
-
177
176
  let timeout = opts.receiveTimeout || this.configuration.receiveTimeout
178
177
  let responseMessageType: Message.Reply | Message.Reject | Message.Timeout | Message.Error = Message.Reply
179
178