lukecwik commented on code in PR #25291:
URL: https://github.com/apache/beam/pull/25291#discussion_r1096296097


##########
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/control/ExecutionStateSamplerTest.java:
##########
@@ -335,6 +359,101 @@ public Long answer(InvocationOnMock invocation) throws 
Throwable {
     expectedLogs.verifyNotLogged("Operation ongoing");
   }
 
+  @Test
+  public void testCountersReturnedAreBasedUponCurrentExecutionState() throws 
Exception {
+    MillisProvider clock = mock(MillisProvider.class);
+    ExecutionStateSampler sampler =
+        new ExecutionStateSampler(
+            
PipelineOptionsFactory.fromArgs("--experiments=state_sampling_period_millis=10")
+                .create(),
+            clock);
+    MetricsContainerStepMap metricsContainerRegistry = new 
MetricsContainerStepMap();
+    ExecutionStateTracker tracker = sampler.create(metricsContainerRegistry);

Review Comment:
   Done, moved ownership into the execution state sampler. There needs to be a 
greater refactoring to move the shortIds into some place where the execution 
state sampler will be responsible for also updating the monitoring data related 
to the metrics container.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to