Skip to content

Commit 7449ae6

Browse files
Merge pull request GoogleCloudPlatform#1399 from Dippatel98:streaming-modes
PiperOrigin-RevId: 619603915
2 parents 4536653 + bd12e42 commit 7449ae6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

it/google-cloud-platform/src/main/java/org/apache/beam/it/gcp/datagenerator/DataGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public static Builder builderWithSchemaTemplate(String testName, String schemaTe
8686
* @return approximate number of messages generated
8787
* @throws IOException if any errors are encountered.
8888
*/
89-
public Integer execute(Duration timeout) throws IOException {
89+
public Long execute(Duration timeout) throws IOException {
9090
LaunchInfo dataGeneratorLaunchInfo =
9191
pipelineLauncher.launch(PROJECT, REGION, dataGeneratorOptions);
9292
assertThatPipeline(dataGeneratorLaunchInfo).isRunning();
@@ -102,11 +102,11 @@ public Integer execute(Duration timeout) throws IOException {
102102
assertThatResult(dataGeneratorResult).hasTimedOut();
103103
}
104104
@SuppressWarnings("nullness")
105-
int generatedMessages =
105+
Long generatedMessages =
106106
pipelineLauncher
107107
.getMetric(
108108
PROJECT, REGION, dataGeneratorLaunchInfo.jobId(), MESSAGES_GENERATED_METRIC_NAME)
109-
.intValue();
109+
.longValue();
110110
LOG.info("Data generator finished. Generated {} messages.", generatedMessages);
111111
return generatedMessages;
112112
}

v1/src/test/java/com/google/cloud/teleport/templates/PubsubToPubsubLT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public void testSteadyState1hr(Function<LaunchConfig.Builder, LaunchConfig.Build
195195
LaunchInfo info = pipelineLauncher.launch(project, region, options);
196196
assertThatPipeline(info).isRunning();
197197
// ElementCount metric in dataflow is approximate, allow for 1% difference
198-
Integer expectedMessages = (int) (dataGenerator.execute(Duration.ofMinutes(60)) * 0.99);
198+
Long expectedMessages = (long) (dataGenerator.execute(Duration.ofMinutes(60)) * 0.99);
199199
Result result =
200200
pipelineOperator.waitForConditionAndCancel(
201201
createConfig(info, Duration.ofMinutes(20)),

0 commit comments

Comments
 (0)