damccorm commented on code in PR #26153:
URL: https://github.com/apache/beam/pull/26153#discussion_r1165498168


##########
sdks/java/io/kafka/kafka-01103/build.gradle:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import org.apache.beam.gradle.kafka.KafkaTestUtilities

Review Comment:
   Rather than having all of these in individual files, could we do this all in 
a loop from the base gradle file with something like 
https://github.com/apache/beam/blob/2325634e0314e28a2756f729ec75f5fd5d54bcbf/runners/spark/3/build.gradle#L53



##########
sdks/java/io/kafka/build.gradle:
##########
@@ -125,48 +116,24 @@ kafkaVersions.each {kv ->
   }
 }
 
-kafkaVersions.each {kv ->
-  task "kafkaVersion${kv.key}BatchIT"(type: Test) {
-    group = "Verification"
-    description = "Runs KafkaIO IT tests with Kafka clients API $kv.value"
-    outputs.upToDateWhen { false }
-    testClassesDirs = sourceSets.test.output.classesDirs
-    classpath =  configurations."kafkaVersion${kv.key}" + 
sourceSets.test.runtimeClasspath
-
-    def pipelineOptions = [
-        '--sourceOptions={' +
-            '"numRecords": "1000",' +
-            '"keySizeBytes": "10",' +
-            '"valueSizeBytes": "90"' +
-            '}',
-        "--readTimeout=120",
-        "--kafkaTopic=beam",
-        "--withTestcontainers=true",
-        "--kafkaContainerVersion=5.5.2",
-    ]
-
-    systemProperty "beamTestPipelineOptions", 
groovy.json.JsonOutput.toJson(pipelineOptions)
-    include '**/KafkaIOIT.class'
-
-    filter {
-      excludeTestsMatching "*InStreaming"
-      if (!(kv.key in sdfKafkaVersions)) {
-        excludeTestsMatching "*DynamicPartitions" //admin client create 
partitions does not exist in kafka 0.11.0.3 and kafka sdf does not appear to 
work for kafka versions <2.0.1
-        excludeTestsMatching "*SDFResumesCorrectly" //Kafka SDF does not work 
for kafka versions <2.0.1
-        excludeTestsMatching "*StopReadingFunction" //Kafka SDF does not work 
for kafka versions <2.0.1
-        excludeTestsMatching "*WatermarkUpdateWithSparseMessages" //Kafka SDF 
does not work for kafka versions <2.0.1
-      }
-    }
-  }
-}
-
+//Because this runs many integration jobs in parallel, each of which use a
+//container, it can fail locally due to performance limitations on a desktop.
+//To avoid this, use --max-workers=N, where N is less than half your CPUs.
+//4 is a good start for parallelism without overloading your computer.

Review Comment:
   This is concerning to me, especially because Jenkins runs several jobs at 
the same time. If you run 2 of these jobs (or even worse, 4) on the same 
Jenkins machine, does the worker fall over?
   
   I wonder if there's a version of this change that does some parallelization 
by default, but not this much (e.g. it spins up at most 4 containers at once)



-- 
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