kileys commented on code in PR #24477:
URL: https://github.com/apache/beam/pull/24477#discussion_r1050283347


##########
.test-infra/jenkins/job_PostCommit_Python_Nexmark_Direct.groovy:
##########
@@ -0,0 +1,58 @@
+/*
+ * 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 CommonJobProperties as commonJobProperties
+import CommonTestProperties.Runner
+import CommonTestProperties.SDK
+import CommonTestProperties.TriggeringContext
+import NexmarkBuilder as Nexmark
+import NoPhraseTriggeringPostCommitBuilder
+import PhraseTriggeringPostCommitBuilder
+import InfluxDBCredentialsHelper
+
+import static NexmarkDatabaseProperties.nexmarkBigQueryArgs
+import static NexmarkDatabaseProperties.nexmarkInfluxDBArgs
+

Review Comment:
   Unused?



##########
.test-infra/jenkins/NexmarkBuilder.groovy:
##########
@@ -174,10 +181,79 @@ class NexmarkBuilder {
     }
   }
 
+  static void pythonSuite(context, String title, Runner runner, SDK sdk, 
Map<String, Object> options) {
+    InfluxDBCredentialsHelper.useCredentials(context)
+
+    for (int i = 0; i <= 12; i ++) {
+      if (
+      // https://github.com/apache/beam/issues/24678
+      i == 1 ||
+      // https://github.com/apache/beam/issues/24679
+      i == 4 || i == 6 || i == 9 ||
+      // https://github.com/apache/beam/issues/24680
+      i == 12) {
+        continue
+      }
+      pythonTest(context, title, i, runner, sdk, options)
+    }
+  }
+
+  static void pythonTest(context, String title, int query, Runner runner, SDK 
sdk, Map<String, Object> options) {
+    context.steps {
+      shell("echo \"*** GENERATE events for ${title} query ${query} with 
Python***\"")
+
+      options.put('query', query)
+
+      // Matches defaults in NexmarkSuite.java
+      if (query == 4 || query == 6 || query == 9) {
+        options.put('numEvents', 10000)
+      } else {
+        options.put('numEvents', 100000)
+      }
+
+      String eventFile = options.get('tempLocation') + 
"/eventFiles/\${BUILD_TAG}/query${query}-"
+      options.remove('input')
+      options.put('generateEventFilePathPrefix', eventFile)
+
+      gradle {
+        rootBuildScriptDir(commonJobProperties.checkoutDir)
+        tasks(':sdks:java:testing:nexmark:run')
+        commonJobProperties.setGradleSwitches(delegate)
+        switches("-Pnexmark.runner=:runners:direct-java")
+        switches("-Pnexmark.args=\"${parseOptions(options)}\"")
+      }

Review Comment:
   Can we just move this into the run task for python?



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