46 REQUIRE(channelPolicies.empty() ==
false);
47 REQUIRE(completionPolicies.empty() ==
false);
48 std::vector<DeviceSpec> devices;
51 REQUIRE(resources.size() == 1);
52 REQUIRE(resources[0].startPort == 22000);
55 REQUIRE(offers.size() == 1);
56 REQUIRE(offers[0].startPort == 22000);
57 REQUIRE(offers[0].rangeSize == 5000);
60 REQUIRE(devices.size() == 2);
61 REQUIRE(devices[0].outputChannels.size() == 1);
62 REQUIRE(devices[0].outputChannels[0].method == ChannelMethod::Bind);
63 REQUIRE(devices[0].outputChannels[0].
type == ChannelType::Push);
64 REQUIRE(devices[0].outputChannels[0].
name ==
"from_A_to_B");
65 REQUIRE(devices[0].outputChannels[0].port == 22000);
66 REQUIRE(devices[0].outputs.size() == 1);
68 REQUIRE(devices[1].inputChannels.size() == 1);
69 REQUIRE(devices[1].inputChannels[0].method == ChannelMethod::Connect);
70 REQUIRE(devices[1].inputChannels[0].
type == ChannelType::Pull);
71 REQUIRE(devices[1].inputChannels[0].
name ==
"from_A_to_B");
72 REQUIRE(devices[1].inputChannels[0].port == 22000);
74 REQUIRE(devices[1].inputs.size() == 1);
75 REQUIRE(devices[1].inputs[0].sourceChannel ==
"from_A_to_B");
185 std::vector<DeviceSpec> devices;
190 REQUIRE(devices.size() == 3);
191 REQUIRE(devices[0].outputChannels.size() == 2);
192 REQUIRE(devices[0].outputChannels[0].method == ChannelMethod::Bind);
193 REQUIRE(devices[0].outputChannels[0].
type == ChannelType::Push);
194 REQUIRE(devices[0].outputChannels[0].
name ==
"from_A_to_B");
195 REQUIRE(devices[0].outputChannels[0].port == 22000);
196 REQUIRE(devices[0].outputChannels[1].method == ChannelMethod::Bind);
197 REQUIRE(devices[0].outputChannels[1].
type == ChannelType::Push);
198 REQUIRE(devices[0].outputChannels[1].
name ==
"from_A_to_C");
199 REQUIRE(devices[0].outputChannels[1].port == 22001);
201 REQUIRE(devices[1].inputChannels.size() == 1);
202 REQUIRE(devices[1].inputChannels[0].method == ChannelMethod::Connect);
203 REQUIRE(devices[1].inputChannels[0].
type == ChannelType::Pull);
204 REQUIRE(devices[1].inputChannels[0].
name ==
"from_A_to_B");
205 REQUIRE(devices[1].inputChannels[0].port == 22000);
207 REQUIRE(devices[2].inputChannels.size() == 1);
208 REQUIRE(devices[2].inputChannels[0].method == ChannelMethod::Connect);
209 REQUIRE(devices[2].inputChannels[0].
type == ChannelType::Pull);
210 REQUIRE(devices[2].inputChannels[0].
name ==
"from_A_to_C");
211 REQUIRE(devices[2].inputChannels[0].port == 22001);
235 std::vector<DeviceSpec> devices;
240 REQUIRE(devices.size() == 4);
241 REQUIRE(devices[0].outputChannels.size() == 2);
242 REQUIRE(devices[0].outputChannels[0].method == ChannelMethod::Bind);
243 REQUIRE(devices[0].outputChannels[0].
type == ChannelType::Push);
244 REQUIRE(devices[0].outputChannels[0].
name ==
"from_A_to_B");
245 REQUIRE(devices[0].outputChannels[0].port == 22000);
246 REQUIRE(devices[0].outputChannels[1].method == ChannelMethod::Bind);
247 REQUIRE(devices[0].outputChannels[1].
type == ChannelType::Push);
248 REQUIRE(devices[0].outputChannels[1].
name ==
"from_A_to_C");
249 REQUIRE(devices[0].outputChannels[1].port == 22001);
251 REQUIRE(devices[1].inputChannels.size() == 1);
252 REQUIRE(devices[1].inputChannels[0].method == ChannelMethod::Connect);
253 REQUIRE(devices[1].inputChannels[0].
type == ChannelType::Pull);
254 REQUIRE(devices[1].inputChannels[0].
name ==
"from_A_to_B");
255 REQUIRE(devices[1].inputChannels[0].port == 22000);
256 REQUIRE(devices[1].outputChannels.size() == 1);
257 REQUIRE(devices[1].outputChannels[0].method == ChannelMethod::Bind);
258 REQUIRE(devices[1].outputChannels[0].
type == ChannelType::Push);
259 REQUIRE(devices[1].outputChannels[0].
name ==
"from_B_to_D");
260 REQUIRE(devices[1].outputChannels[0].port == 22002);
262 REQUIRE(devices[2].inputChannels.size() == 1);
263 REQUIRE(devices[2].inputChannels[0].method == ChannelMethod::Connect);
264 REQUIRE(devices[2].inputChannels[0].
type == ChannelType::Pull);
265 REQUIRE(devices[2].inputChannels[0].
name ==
"from_A_to_C");
266 REQUIRE(devices[2].inputChannels[0].port == 22001);
267 REQUIRE(devices[2].outputChannels.size() == 1);
268 REQUIRE(devices[2].outputChannels[0].method == ChannelMethod::Bind);
269 REQUIRE(devices[2].outputChannels[0].
type == ChannelType::Push);
270 REQUIRE(devices[2].outputChannels[0].
name ==
"from_C_to_D");
271 REQUIRE(devices[2].outputChannels[0].port == 22003);
273 REQUIRE(devices[3].inputChannels.size() == 2);
274 REQUIRE(devices[3].inputChannels[0].method == ChannelMethod::Connect);
275 REQUIRE(devices[3].inputChannels[0].
type == ChannelType::Pull);
276 REQUIRE(devices[3].inputChannels[0].
name ==
"from_B_to_D");
277 REQUIRE(devices[3].inputChannels[0].port == 22002);
278 REQUIRE(devices[3].inputChannels[1].method == ChannelMethod::Connect);
279 REQUIRE(devices[3].inputChannels[1].
type == ChannelType::Pull);
280 REQUIRE(devices[3].inputChannels[1].
name ==
"from_C_to_D");
281 REQUIRE(devices[3].inputChannels[1].port == 22003);
306 std::vector<DeviceSpec> devices;
311 REQUIRE(devices.size() == 3);
312 REQUIRE(devices[0].outputChannels.size() == 1);
313 REQUIRE(devices[0].outputChannels[0].method == ChannelMethod::Bind);
314 REQUIRE(devices[0].outputChannels[0].
type == ChannelType::Push);
315 REQUIRE(devices[0].outputChannels[0].
name ==
"from_A_to_B");
316 REQUIRE(devices[0].outputChannels[0].port == 22000);
318 REQUIRE(devices[1].inputChannels.size() == 1);
319 REQUIRE(devices[1].inputChannels[0].method == ChannelMethod::Connect);
320 REQUIRE(devices[1].inputChannels[0].
type == ChannelType::Pull);
321 REQUIRE(devices[1].inputChannels[0].
name ==
"from_A_to_B");
322 REQUIRE(devices[1].inputChannels[0].port == 22000);
323 REQUIRE(devices[1].outputChannels.size() == 1);
324 REQUIRE(devices[1].outputChannels[0].method == ChannelMethod::Bind);
325 REQUIRE(devices[1].outputChannels[0].
type == ChannelType::Push);
326 REQUIRE(devices[1].outputChannels[0].
name ==
"from_B_to_C");
327 REQUIRE(devices[1].outputChannels[0].port == 22001);
329 REQUIRE(devices[2].inputChannels.size() == 1);
330 REQUIRE(devices[2].inputChannels[0].method == ChannelMethod::Connect);
331 REQUIRE(devices[2].inputChannels[0].
type == ChannelType::Pull);
332 REQUIRE(devices[2].inputChannels[0].
name ==
"from_B_to_C");
333 REQUIRE(devices[2].inputChannels[0].port == 22001);
335 REQUIRE(devices[0].inputs.size() == 0);
336 REQUIRE(devices[1].inputs.size() == 1);
337 REQUIRE(devices[2].inputs.size() == 1);
341 REQUIRE(devices[0].outputs.size() == 1);
342 REQUIRE(devices[1].outputs.size() == 0);
343 REQUIRE(devices[2].outputs.size() == 0);
345 REQUIRE(devices[1].inputs[0].sourceChannel ==
"from_A_to_B");
346 REQUIRE(devices[2].inputs[0].sourceChannel ==
"from_B_to_C");
348 REQUIRE(devices[0].forwards.size() == 0);
349 REQUIRE(devices[1].forwards.size() == 1);
350 REQUIRE(devices[2].forwards.size() == 0);
387 std::vector<DeviceSpec> devices;
388 std::vector<DeviceId> deviceIndex;
389 std::vector<DeviceConnectionId> connections;
390 std::vector<LogicalForwardInfo> availableForwardsInfo;
392 std::vector<OutputSpec> globalOutputs = {
OutputSpec{
"TST",
"A"},
395 std::vector<size_t> edgeOutIndex{0, 1, 2, 3, 6, 4, 7, 5, 8};
396 std::vector<DeviceConnectionEdge> logicalEdges = {
397 {0, 1, 0, 0, 0, 0,
false, ConnectionKind::Out},
398 {0, 1, 1, 0, 0, 0,
false, ConnectionKind::Out},
399 {0, 1, 2, 0, 0, 0,
false, ConnectionKind::Out},
400 {1, 2, 0, 0, 1, 0,
false, ConnectionKind::Out},
401 {1, 2, 0, 1, 1, 0,
false, ConnectionKind::Out},
402 {1, 2, 0, 2, 1, 0,
false, ConnectionKind::Out},
403 {1, 2, 1, 0, 1, 0,
false, ConnectionKind::Out},
404 {1, 2, 1, 1, 1, 0,
false, ConnectionKind::Out},
405 {1, 2, 1, 2, 1, 0,
false, ConnectionKind::Out},
408 std::vector<EdgeAction> actions{
429 defaultOffer.
cpu = 0.01;
430 defaultOffer.
memory = 0.01;
433 actions, workflow, globalOutputs, channelPolicies, sendingPolicies, forwardingPolicies,
"", defaultOffer);
435 std::vector<DeviceId> expectedDeviceIndex = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 2}, {1, 1, 2}, {1, 2, 3}, {1, 2, 3}};
436 REQUIRE(devices.size() == 4);
438 REQUIRE(expectedDeviceIndex.size() == deviceIndex.size());
440 for (
size_t i = 0;
i < expectedDeviceIndex.size(); ++
i) {
449 REQUIRE(devices[0].outputChannels.size() == 3);
450 REQUIRE(devices[1].outputChannels.size() == 2);
451 REQUIRE(devices[2].outputChannels.size() == 2);
452 REQUIRE(devices[3].outputChannels.size() == 2);
455 REQUIRE(devices[0].outputs.size() == 3);
456 REQUIRE(devices[1].outputs.size() == 2);
457 REQUIRE(devices[2].outputs.size() == 2);
458 REQUIRE(devices[3].outputs.size() == 2);
461 REQUIRE(offers.size() == 1);
462 REQUIRE(offers[0].startPort == 22009);
465 std::vector<size_t> edgeInIndex{0, 1, 2, 3, 4, 5, 6, 7, 8};
467 std::vector<EdgeAction> inActions{
479 std::sort(connections.begin(), connections.end());
482 inActions, workflow, availableForwardsInfo, channelPolicies,
"", defaultOffer);
484 std::vector<DeviceId> expectedDeviceIndexFinal = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 2}, {1, 1, 2}, {1, 2, 3}, {1, 2, 3}, {2, 0, 4}, {2, 1, 5}};
485 REQUIRE(expectedDeviceIndexFinal.size() == deviceIndex.size());
487 for (
size_t i = 0;
i < expectedDeviceIndexFinal.size(); ++
i) {
497 REQUIRE(devices.size() == 6);
498 std::vector<std::string> expectedDeviceNames = {
"A",
"B_t0",
"B_t1",
"B_t2",
"C_t0",
"C_t1"};
500 for (
size_t i = 0;
i < devices.size(); ++
i) {
501 REQUIRE(devices[
i].
id == expectedDeviceNames[
i]);
505 REQUIRE(devices[0].outputChannels.size() == 3);
506 REQUIRE(devices[1].outputChannels.size() == 2);
507 REQUIRE(devices[2].outputChannels.size() == 2);
508 REQUIRE(devices[3].outputChannels.size() == 2);
509 REQUIRE(devices[4].outputChannels.size() == 0);
510 REQUIRE(devices[5].outputChannels.size() == 0);
513 REQUIRE(devices[0].outputs.size() == 3);
514 REQUIRE(devices[1].outputs.size() == 2);
515 REQUIRE(devices[2].outputs.size() == 2);
516 REQUIRE(devices[3].outputs.size() == 2);
517 REQUIRE(devices[4].outputs.size() == 0);
518 REQUIRE(devices[5].outputs.size() == 0);
522 std::vector<std::vector<OutputRoute>> expectedRoutes = {
524 OutputRoute{0, 3, globalOutputs[0],
"from_A_to_B_t0", &dummy},
525 OutputRoute{1, 3, globalOutputs[0],
"from_A_to_B_t1", &dummy},
526 OutputRoute{2, 3, globalOutputs[0],
"from_A_to_B_t2", &dummy},
529 OutputRoute{0, 2, globalOutputs[1],
"from_B_t0_to_C_t0", &dummy},
530 OutputRoute{1, 2, globalOutputs[1],
"from_B_t0_to_C_t1", &dummy},
533 OutputRoute{0, 2, globalOutputs[1],
"from_B_t1_to_C_t0", &dummy},
534 OutputRoute{1, 2, globalOutputs[1],
"from_B_t1_to_C_t1", &dummy},
537 OutputRoute{0, 2, globalOutputs[1],
"from_B_t2_to_C_t0", &dummy},
538 OutputRoute{1, 2, globalOutputs[1],
"from_B_t2_to_C_t1", &dummy},
542 for (
size_t di = 0;
di < expectedRoutes.size();
di++) {
543 auto& routes = expectedRoutes[
di];
544 auto& device = devices[
di];
545 for (
size_t ri = 0; ri < device.outputs.size(); ri++) {
549 REQUIRE(std::string(concreteA.origin.as<std::string>()) == std::string(concreteB.origin.as<std::string>()));
550 REQUIRE(device.outputs[ri].channel == routes[ri].channel);
551 REQUIRE(device.outputs[ri].timeslice == routes[ri].timeslice);
556 REQUIRE(devices[0].inputChannels.size() == 0);
557 REQUIRE(devices[1].inputChannels.size() == 1);
558 REQUIRE(devices[2].inputChannels.size() == 1);
559 REQUIRE(devices[3].inputChannels.size() == 1);
560 REQUIRE(devices[4].inputChannels.size() == 3);
561 REQUIRE(devices[5].inputChannels.size() == 3);
564 REQUIRE(devices[0].inputs.size() == 0);
565 REQUIRE(devices[1].inputs.size() == 1);
566 REQUIRE(devices[2].inputs.size() == 1);
567 REQUIRE(devices[3].inputs.size() == 1);
568 REQUIRE(devices[4].inputs.size() == 3);
569 REQUIRE(devices[5].inputs.size() == 3);
571 REQUIRE(devices[1].inputs[0].sourceChannel ==
"from_A_to_B_t0");
572 REQUIRE(devices[2].inputs[0].sourceChannel ==
"from_A_to_B_t1");
573 REQUIRE(devices[3].inputs[0].sourceChannel ==
"from_A_to_B_t2");
575 REQUIRE(devices[4].inputs[0].sourceChannel ==
"from_B_t0_to_C_t0");
576 REQUIRE(devices[4].inputs[1].sourceChannel ==
"from_B_t1_to_C_t0");
577 REQUIRE(devices[4].inputs[2].sourceChannel ==
"from_B_t2_to_C_t0");
579 REQUIRE(devices[5].inputs[0].sourceChannel ==
"from_B_t0_to_C_t1");
580 REQUIRE(devices[5].inputs[1].sourceChannel ==
"from_B_t1_to_C_t1");
581 REQUIRE(devices[5].inputs[2].sourceChannel ==
"from_B_t2_to_C_t1");
587 std::vector<DeviceSpec> devices;
595 REQUIRE(devices.size() == 6);
596 REQUIRE(devices[0].
id ==
"A");
597 REQUIRE(devices[1].
id ==
"B_t0");
598 REQUIRE(devices[2].
id ==
"B_t1");
599 REQUIRE(devices[3].
id ==
"B_t2");
600 REQUIRE(devices[4].
id ==
"C_t0");
601 REQUIRE(devices[5].
id ==
"C_t1");
603 REQUIRE(devices[0].inputChannels.size() == 0);
604 REQUIRE(devices[0].outputChannels.size() == 3);
605 REQUIRE(devices[0].outputChannels[0].method == ChannelMethod::Bind);
606 REQUIRE(devices[0].outputChannels[0].
type == ChannelType::Push);
607 REQUIRE(devices[0].outputChannels[0].
name ==
"from_A_to_B_t0");
608 REQUIRE(devices[0].outputChannels[0].port == 22000);
609 REQUIRE(devices[0].outputChannels[1].method == ChannelMethod::Bind);
610 REQUIRE(devices[0].outputChannels[1].
type == ChannelType::Push);
611 REQUIRE(devices[0].outputChannels[1].
name ==
"from_A_to_B_t1");
612 REQUIRE(devices[0].outputChannels[1].port == 22001);
613 REQUIRE(devices[0].outputChannels[2].method == ChannelMethod::Bind);
614 REQUIRE(devices[0].outputChannels[2].
type == ChannelType::Push);
615 REQUIRE(devices[0].outputChannels[2].
name ==
"from_A_to_B_t2");
616 REQUIRE(devices[0].outputChannels[2].port == 22002);
618 REQUIRE(devices[1].inputChannels.size() == 1);
619 REQUIRE(devices[1].inputChannels[0].method == ChannelMethod::Connect);
620 REQUIRE(devices[1].inputChannels[0].
type == ChannelType::Pull);
621 REQUIRE(devices[1].inputChannels[0].
name ==
"from_A_to_B_t0");
622 REQUIRE(devices[1].inputChannels[0].port == 22000);
623 REQUIRE(devices[1].outputChannels.size() == 2);
624 REQUIRE(devices[1].outputChannels[0].method == ChannelMethod::Bind);
625 REQUIRE(devices[1].outputChannels[0].
type == ChannelType::Push);
626 REQUIRE(devices[1].outputChannels[0].
name ==
"from_B_t0_to_C_t0");
627 REQUIRE(devices[1].outputChannels[0].port == 22003);
628 REQUIRE(devices[1].outputChannels[1].method == ChannelMethod::Bind);
629 REQUIRE(devices[1].outputChannels[1].
type == ChannelType::Push);
630 REQUIRE(devices[1].outputChannels[1].
name ==
"from_B_t0_to_C_t1");
631 REQUIRE(devices[1].outputChannels[1].port == 22004);
633 REQUIRE(devices[2].inputChannels.size() == 1);
634 REQUIRE(devices[2].inputChannels[0].method == ChannelMethod::Connect);
635 REQUIRE(devices[2].inputChannels[0].
type == ChannelType::Pull);
636 REQUIRE(devices[2].inputChannels[0].
name ==
"from_A_to_B_t1");
637 REQUIRE(devices[2].inputChannels[0].port == 22001);
638 REQUIRE(devices[2].outputChannels.size() == 2);
639 REQUIRE(devices[2].outputChannels[0].method == ChannelMethod::Bind);
640 REQUIRE(devices[2].outputChannels[0].
type == ChannelType::Push);
641 REQUIRE(devices[2].outputChannels[0].
name ==
"from_B_t1_to_C_t0");
642 REQUIRE(devices[2].outputChannels[0].port == 22005);
643 REQUIRE(devices[2].outputChannels[1].method == ChannelMethod::Bind);
644 REQUIRE(devices[2].outputChannels[1].
type == ChannelType::Push);
645 REQUIRE(devices[2].outputChannels[1].
name ==
"from_B_t1_to_C_t1");
646 REQUIRE(devices[2].outputChannels[1].port == 22006);
648 REQUIRE(devices[3].inputChannels.size() == 1);
649 REQUIRE(devices[3].inputChannels[0].method == ChannelMethod::Connect);
650 REQUIRE(devices[3].inputChannels[0].
type == ChannelType::Pull);
651 REQUIRE(devices[3].inputChannels[0].
name ==
"from_A_to_B_t2");
652 REQUIRE(devices[3].inputChannels[0].port == 22002);
653 REQUIRE(devices[3].outputChannels.size() == 2);
654 REQUIRE(devices[3].outputChannels[0].method == ChannelMethod::Bind);
655 REQUIRE(devices[3].outputChannels[0].
type == ChannelType::Push);
656 REQUIRE(devices[3].outputChannels[0].
name ==
"from_B_t2_to_C_t0");
657 REQUIRE(devices[3].outputChannels[0].port == 22007);
658 REQUIRE(devices[3].outputChannels[1].method == ChannelMethod::Bind);
659 REQUIRE(devices[3].outputChannels[1].
type == ChannelType::Push);
660 REQUIRE(devices[3].outputChannels[1].
name ==
"from_B_t2_to_C_t1");
661 REQUIRE(devices[3].outputChannels[1].port == 22008);
663 REQUIRE(devices[4].inputChannels.size() == 3);
664 REQUIRE(devices[4].inputChannels[0].method == ChannelMethod::Connect);
665 REQUIRE(devices[4].inputChannels[0].
type == ChannelType::Pull);
666 REQUIRE(devices[4].inputChannels[0].
name ==
"from_B_t0_to_C_t0");
667 REQUIRE(devices[4].inputChannels[0].port == 22003);
668 REQUIRE(devices[4].inputChannels[1].method == ChannelMethod::Connect);
669 REQUIRE(devices[4].inputChannels[1].
type == ChannelType::Pull);
670 REQUIRE(devices[4].inputChannels[1].
name ==
"from_B_t1_to_C_t0");
671 REQUIRE(devices[4].inputChannels[1].port == 22005);
672 REQUIRE(devices[4].inputChannels[2].method == ChannelMethod::Connect);
673 REQUIRE(devices[4].inputChannels[2].
type == ChannelType::Pull);
674 REQUIRE(devices[4].inputChannels[2].
name ==
"from_B_t2_to_C_t0");
675 REQUIRE(devices[4].inputChannels[2].port == 22007);
676 REQUIRE(devices[4].outputChannels.size() == 0);
678 REQUIRE(devices[5].inputChannels.size() == 3);
679 REQUIRE(devices[5].inputChannels[0].method == ChannelMethod::Connect);
680 REQUIRE(devices[5].inputChannels[0].
type == ChannelType::Pull);
681 REQUIRE(devices[5].inputChannels[0].
name ==
"from_B_t0_to_C_t1");
682 REQUIRE(devices[5].inputChannels[0].port == 22004);
683 REQUIRE(devices[5].inputChannels[1].method == ChannelMethod::Connect);
684 REQUIRE(devices[5].inputChannels[1].
type == ChannelType::Pull);
685 REQUIRE(devices[5].inputChannels[1].
name ==
"from_B_t1_to_C_t1");
686 REQUIRE(devices[5].inputChannels[1].port == 22006);
687 REQUIRE(devices[5].inputChannels[2].method == ChannelMethod::Connect);
688 REQUIRE(devices[5].inputChannels[2].
type == ChannelType::Pull);
689 REQUIRE(devices[5].inputChannels[2].
name ==
"from_B_t2_to_C_t1");
690 REQUIRE(devices[5].inputChannels[2].port == 22008);
691 REQUIRE(devices[5].outputChannels.size() == 0);
719 std::vector<DeviceSpec> devices;
720 std::vector<DeviceId> deviceIndex;
721 std::vector<DeviceConnectionId> connections;
722 std::vector<LogicalForwardInfo> availableForwardsInfo;
724 std::vector<OutputSpec> globalOutputs = {
OutputSpec{
"A",
"1"},
726 OutputSpec{
"DPL",
"TIMER", 0, Lifetime::Timer}};
729 std::vector<size_t> edgeOutIndex{1, 2, 0};
730 std::vector<size_t> edgeInIndex{0, 1, 2};
731 std::vector<DeviceConnectionEdge> logicalEdges = {
732 {2, 0, 0, 0, 2, 0,
false, ConnectionKind::Out},
733 {0, 1, 0, 0, 0, 0,
false, ConnectionKind::Out},
734 {0, 1, 0, 0, 1, 0,
false, ConnectionKind::Out},
738 std::vector<EdgeAction> outActions{
745 std::vector<EdgeAction> inActions{
752 defaultOffer.
cpu = 0.01;
753 defaultOffer.
memory = 0.01;
756 outActions, workflow, globalOutputs, channelPolicies, sendingPolicies, forwardingPolicies,
"", defaultOffer);
758 REQUIRE(devices.size() == 2);
760 REQUIRE(devices[0].
name ==
"A");
761 REQUIRE(devices[1].
name ==
"internal-dpl-timer");
762 REQUIRE(deviceIndex.size() == 2);
763 REQUIRE(deviceIndex[0].processorIndex == 0);
765 REQUIRE(deviceIndex[0].timeslice == 0);
767 REQUIRE(deviceIndex[0].deviceIndex == 0);
769 REQUIRE(deviceIndex[1].processorIndex == 2);
771 REQUIRE(deviceIndex[1].timeslice == 0);
773 REQUIRE(deviceIndex[1].deviceIndex == 1);
776 std::sort(connections.begin(), connections.end());
779 inActions, workflow, availableForwardsInfo, channelPolicies,
"", defaultOffer);
781 REQUIRE(devices.size() == 3);
783 REQUIRE(devices[0].
name ==
"A");
784 REQUIRE(devices[1].
name ==
"internal-dpl-timer");
785 REQUIRE(devices[2].
name ==
"B");
786 REQUIRE(deviceIndex.size() == 3);
787 REQUIRE(deviceIndex[1].processorIndex == 1);
789 REQUIRE(deviceIndex[1].timeslice == 0);
791 REQUIRE(deviceIndex[1].deviceIndex == 2);
796 REQUIRE(devices[2].inputs.size() == 1);