Skip to content

Commit 52a70c8

Browse files
committed
exposed it-thread-count for IT
1 parent e8fde11 commit 52a70c8

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

.github/workflows/java-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ jobs:
171171
--it-region="${{ env.IT_REGION }}" \
172172
--it-project="cloud-teleport-testing" \
173173
--it-integration-test-parallelism=6 \
174+
--it-thread-count=8 \
174175
--it-artifact-bucket="cloud-teleport-testing-it-gitactions" \
175176
--it-private-connectivity="datastream-private-connect-us-central1"
176177
- name: Upload Integration Tests Report

cicd/cmd/run-it-tests/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func main() {
5656
mvnFlags.SkipJib(),
5757
mvnFlags.SkipShade(),
5858
mvnFlags.RunIntegrationTests(flags.UnifiedWorkerHarnessContainerImage() != ""),
59-
mvnFlags.ThreadCount(4),
59+
mvnFlags.ThreadCount(flags.ThreadCount()),
6060
mvnFlags.IntegrationTestParallelism(flags.IntegrationTestParallelism()),
6161
mvnFlags.StaticBigtableInstance("teleport"),
6262
mvnFlags.StaticSpannerInstance("teleport"),

cicd/internal/flags/it-flags.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ var (
4141
dCloudOracleSysPassword string
4242
dUnifiedWorkerHarnessContainerImage string
4343
dIntegrationTestParallelism string
44+
dThreadCount string
4445
)
4546

4647
// Registers all it flags. Must be called before flag.Parse().
@@ -62,6 +63,7 @@ func RegisterItFlags() {
6263
flag.StringVar(&dCloudOracleSysPassword, "it-oracle-sys-password", "oracle", "sys password of static Oracle DB")
6364
flag.StringVar(&dUnifiedWorkerHarnessContainerImage, "it-unified-worker-harness-container-image", "", "Runner harness image to run tests against")
6465
flag.StringVar(&dIntegrationTestParallelism, "it-integration-test-parallelism", "3", "The level of parallelism for integration tests")
66+
flag.StringVar(&dThreadCount, "it-thread-count", "4", "The IT thread count to use for maven, which is the number of threads per core")
6567
}
6668

6769
func Region() string {
@@ -159,3 +161,9 @@ func IntegrationTestParallelism() int {
159161
fmt.Sscan(dIntegrationTestParallelism, &i)
160162
return i
161163
}
164+
165+
func ThreadCount() int {
166+
i := 4
167+
fmt.Sscan(dThreadCount, &i)
168+
return i
169+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private void testPubSubToSplunkMain(
162162
"search source=\"" + source + "\" sourcetype=\"" + sourceType + "\" host=\"" + host + "\"";
163163
PipelineOperator.Result result =
164164
pipelineOperator()
165-
.waitForConditionsAndFinish(
165+
.waitForConditionAndCancel(
166166
createConfig(info),
167167
CustomSplunkEventsCheck.builder(splunkResourceManager)
168168
.setQuery(query)

v2/googlecloud-to-googlecloud/src/test/java/com/google/cloud/teleport/v2/templates/PubSubToBigQueryIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private void basePubsubToBigQuery(
178178

179179
Result result =
180180
pipelineOperator()
181-
.waitForConditionsAndFinish(
181+
.waitForConditionAndCancel(
182182
createConfig(info),
183183
BigQueryRowsCheck.builder(bigQueryResourceManager, table)
184184
.setMinRows(MESSAGES_COUNT)
@@ -295,7 +295,7 @@ private void basePubsubToBigQueryWithReload(
295295

296296
Result reloadedResult =
297297
pipelineOperator()
298-
.waitForConditionsAndFinish(
298+
.waitForConditionAndCancel(
299299
createConfig(info),
300300
BigQueryRowsCheck.builder(bigQueryResourceManager, table)
301301
.setMinRows(MESSAGES_COUNT * 2)
@@ -359,7 +359,7 @@ private void pubsubToBigQueryWithPythonUdf(
359359

360360
Result result =
361361
pipelineOperator()
362-
.waitForConditionsAndFinish(
362+
.waitForConditionAndCancel(
363363
createConfig(info),
364364
BigQueryRowsCheck.builder(bigQueryResourceManager, table)
365365
.setMinRows(MESSAGES_COUNT)
@@ -427,7 +427,7 @@ private void pubsubToBigQueryNoUdf(
427427

428428
Result result =
429429
pipelineOperator()
430-
.waitForConditionsAndFinish(
430+
.waitForConditionAndCancel(
431431
createConfig(info),
432432
BigQueryRowsCheck.builder(bigQueryResourceManager, table)
433433
.setMinRows(MESSAGES_COUNT)

0 commit comments

Comments
 (0)