tests/index.jsView |
---|
47 | 47 | |
48 | 48 | const hypervisor = new Hypervisor(tree) |
49 | 49 | hypervisor.registerContainer(testVMContainer) |
50 | 50 | |
51 | | - const {module} = await hypervisor.createActor(testVMContainer.typeId) |
| 51 | + const {module} = hypervisor.createActor(testVMContainer.typeId) |
52 | 52 | |
53 | 53 | const message = new Message({ |
54 | 54 | funcRef: module.main, |
55 | 55 | funcArguments: [1] |
93 | 93 | const hypervisor = new Hypervisor(tree) |
94 | 94 | hypervisor.registerContainer(testVMContainerA) |
95 | 95 | hypervisor.registerContainer(testVMContainerB) |
96 | 96 | |
97 | | - const {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
98 | | - const {module: moduleA} = await hypervisor.createActor(testVMContainerA.typeId) |
| 97 | + const {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
| 98 | + const {module: moduleA} = hypervisor.createActor(testVMContainerA.typeId) |
99 | 99 | |
100 | 100 | const message = new Message({ |
101 | 101 | funcRef: moduleA.main, |
102 | 102 | funcArguments: [moduleB.main] |
141 | 141 | const hypervisor = new Hypervisor(tree) |
142 | 142 | hypervisor.registerContainer(testVMContainerA) |
143 | 143 | hypervisor.registerContainer(testVMContainerB) |
144 | 144 | |
145 | | - let {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
146 | | - let {module: moduleA0} = await hypervisor.createActor(testVMContainerA.typeId) |
147 | | - let {module: moduleA1} = await hypervisor.createActor(testVMContainerA.typeId) |
| 145 | + let {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
| 146 | + let {module: moduleA0} = hypervisor.createActor(testVMContainerA.typeId) |
| 147 | + let {module: moduleA1} = hypervisor.createActor(testVMContainerA.typeId) |
148 | 148 | |
149 | 149 | const message0 = new Message({ |
150 | 150 | funcRef: moduleA0.main, |
151 | 151 | funcArguments: [moduleB.main] |
197 | 197 | const hypervisor = new Hypervisor(tree) |
198 | 198 | hypervisor.registerContainer(testVMContainerA) |
199 | 199 | hypervisor.registerContainer(testVMContainerB) |
200 | 200 | |
201 | | - let actorB = await hypervisor.createActor(testVMContainerB.typeId) |
202 | | - let actorA0 = await hypervisor.createActor(testVMContainerA.typeId) |
203 | | - let actorA1 = await hypervisor.createActor(testVMContainerA.typeId) |
| 201 | + let actorB = hypervisor.createActor(testVMContainerB.typeId) |
| 202 | + let actorA0 = hypervisor.createActor(testVMContainerA.typeId) |
| 203 | + let actorA1 = hypervisor.createActor(testVMContainerA.typeId) |
204 | 204 | |
205 | 205 | const message0 = new Message({ |
206 | 206 | funcRef: actorA0.module.main, |
207 | 207 | funcArguments: [actorB.module.main] |
254 | 254 | const hypervisor = new Hypervisor(tree) |
255 | 255 | hypervisor.registerContainer(testVMContainerA) |
256 | 256 | hypervisor.registerContainer(testVMContainerB) |
257 | 257 | |
258 | | - let {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
259 | | - let {module: moduleA} = await hypervisor.createActor(testVMContainerA.typeId) |
| 258 | + let {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
| 259 | + let {module: moduleA} = hypervisor.createActor(testVMContainerA.typeId) |
260 | 260 | const message = new Message({ |
261 | 261 | funcRef: moduleA.main, |
262 | 262 | funcArguments: [moduleB.main] |
263 | 263 | }) |
277 | 277 | }) |
278 | 278 | |
279 | 279 | class testVMContainerA extends BaseContainer { |
280 | 280 | async start (funcRef) { |
281 | | - const {module} = await this.actor.createActor(testVMContainerB.typeId) |
| 281 | + const {module} = this.actor.createActor(testVMContainerB.typeId) |
282 | 282 | const message = new Message({ |
283 | 283 | funcRef: module.main, |
284 | 284 | funcArguments: [{ |
285 | 285 | name: 'main', |
306 | 306 | const hypervisor = new Hypervisor(tree) |
307 | 307 | hypervisor.registerContainer(testVMContainerA) |
308 | 308 | hypervisor.registerContainer(testVMContainerB) |
309 | 309 | |
310 | | - const {module} = await hypervisor.createActor(testVMContainerA.typeId) |
| 310 | + const {module} = hypervisor.createActor(testVMContainerA.typeId) |
311 | 311 | await hypervisor.send(new Message({funcRef: module.start})) |
312 | 312 | |
313 | 313 | const stateRoot = await hypervisor.createStateRoot() |
314 | 314 | t.deepEquals(stateRoot, expectedState, 'expected root!') |
370 | 370 | const hypervisor = new Hypervisor(tree) |
371 | 371 | hypervisor.registerContainer(testVMContainerA) |
372 | 372 | hypervisor.registerContainer(testVMContainerB) |
373 | 373 | |
374 | | - const {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
375 | | - const {module: moduleA} = await hypervisor.createActor(testVMContainerA.typeId) |
| 374 | + const {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
| 375 | + const {module: moduleA} = hypervisor.createActor(testVMContainerA.typeId) |
376 | 376 | const message = new Message({ |
377 | 377 | funcRef: moduleA.main, |
378 | 378 | funcArguments: [moduleB.main] |
379 | 379 | }) |
427 | 427 | const hypervisor = new Hypervisor(tree) |
428 | 428 | hypervisor.registerContainer(testVMContainerA) |
429 | 429 | hypervisor.registerContainer(testVMContainerB) |
430 | 430 | |
431 | | - let {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
| 431 | + let {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
432 | 432 | hypervisor.send(new Message({ |
433 | 433 | funcRef: moduleB.main, |
434 | 434 | funcArguments: ['first'] |
435 | 435 | })) |
436 | 436 | |
437 | | - const {module: moduleA0} = await hypervisor.createActor(testVMContainerA.typeId) |
| 437 | + const {module: moduleA0} = hypervisor.createActor(testVMContainerA.typeId) |
438 | 438 | |
439 | 439 | hypervisor.send(new Message({ |
440 | 440 | funcRef: moduleA0.main, |
441 | 441 | funcArguments: [moduleB.main, 'second'] |
442 | 442 | })) |
443 | 443 | |
444 | | - const {module: moduleA1} = await hypervisor.createActor(testVMContainerA.typeId) |
| 444 | + const {module: moduleA1} = hypervisor.createActor(testVMContainerA.typeId) |
445 | 445 | hypervisor.send(new Message({ |
446 | 446 | funcRef: moduleA1.main, |
447 | 447 | funcArguments: [moduleB.main, 'third'] |
448 | 448 | })) |
497 | 497 | const hypervisor = new Hypervisor(tree) |
498 | 498 | hypervisor.registerContainer(testVMContainerA) |
499 | 499 | hypervisor.registerContainer(testVMContainerB) |
500 | 500 | |
501 | | - const {module: moduleB} = await hypervisor.createActor(testVMContainerB.typeId) |
502 | | - const {module: moduleA} = await hypervisor.createActor(testVMContainerA.typeId) |
| 501 | + const {module: moduleB} = hypervisor.createActor(testVMContainerB.typeId) |
| 502 | + const {module: moduleA} = hypervisor.createActor(testVMContainerA.typeId) |
503 | 503 | |
504 | 504 | const message = new Message({ |
505 | 505 | funcRef: moduleA.main, |
506 | 506 | funcArguments: [moduleB.main] |
547 | 547 | |
548 | 548 | const refernces = [] |
549 | 549 | let _numOfActors = numOfActors |
550 | 550 | while (_numOfActors--) { |
551 | | - const {module} = await hypervisor.createActor(BenchmarkContainer.typeId) |
| 551 | + const {module} = hypervisor.createActor(BenchmarkContainer.typeId) |
552 | 552 | refernces.push(module.main) |
553 | 553 | } |
554 | 554 | _numOfActors = numOfActors |
555 | 555 | let msgs = [] |