jrmccluskey commented on code in PR #31037:
URL: https://github.com/apache/beam/pull/31037#discussion_r1570931199
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineDebugOptions.java:
##########
@@ -219,10 +219,10 @@ public Dataflow create(PipelineOptions options) {
/** The max amount of time an UnboundedReader is consumed before
checkpointing. */
@Description(
Review Comment:
Mentioning that the representation can be in fractions of seconds is
probably a good call-out here
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/WorkerCustomSourcesTest.java:
##########
@@ -645,10 +646,10 @@ public void testReadUnboundedReader() throws Exception {
numReadOnThisIteration++;
}
Instant afterReading = Instant.now();
- long maxReadSec = debugOptions.getUnboundedReaderMaxReadTimeSec();
+ double maxReadSec = debugOptions.getUnboundedReaderMaxReadTimeSec();
assertThat(
- new Duration(beforeReading, afterReading).getStandardSeconds(),
- lessThanOrEqualTo(maxReadSec + 1));
+ new Duration(beforeReading, afterReading).getMillis(),
+ lessThanOrEqualTo((long) (maxReadSec * 1000L)));
Review Comment:
I think you're short a second on this comparison looking at the old unit
test, although I do not know if the increased resolution to milliseconds
renders the +1 second useless or not
--
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]