perf(selfop): route collected orders once after resolution
This commit is contained in:
+3
@@ -309,6 +309,9 @@ class SelfopDiscoveryServiceTest {
|
||||
service.collect(task,run,lease);
|
||||
verify(client,never()).detail(any(),anyString(),anyString(),anyString());
|
||||
assertEquals("ROUTED",run.getStatus());assertEquals(2,stored.size());
|
||||
// Two orders, one warehouse: initial WAITING_SOURCE and final READY projections only.
|
||||
verify(orders,times(4)).selectOne(any());
|
||||
assertTrue(children.values().stream().allMatch(child->"READY".equals(child.getStatus())));
|
||||
assertTrue(stored.values().stream().allMatch(s->"VALID".equals(s.getValidationStatus())));
|
||||
var quantities=stored.values().stream().map(s->read(s.getPayloadJson(),SelfopPayloads.Order.class).items().get(0).actualQuantity()).toList();
|
||||
assertTrue(quantities.stream().anyMatch(q->q.compareTo(new BigDecimal("2.123456"))==0));
|
||||
|
||||
Reference in New Issue
Block a user