bzablocki commented on code in PR #31543:
URL: https://github.com/apache/beam/pull/31543#discussion_r1664803679


##########
sdks/java/io/solace/src/test/java/org/apache/beam/sdk/io/solace/it/SolaceIOIT.java:
##########
@@ -0,0 +1,128 @@
+/*
+ * 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.
+ */
+package org.apache.beam.sdk.io.solace.it;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.beam.sdk.PipelineResult;
+import org.apache.beam.sdk.io.solace.SolaceIO;
+import 
org.apache.beam.sdk.io.solace.broker.BasicAuthJcsmpSessionServiceFactory;
+import org.apache.beam.sdk.io.solace.broker.BasicAuthSempClientFactory;
+import org.apache.beam.sdk.io.solace.data.Solace.Queue;
+import org.apache.beam.sdk.metrics.Counter;
+import org.apache.beam.sdk.metrics.Metrics;
+import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.options.StreamingOptions;
+import org.apache.beam.sdk.testing.TestPipeline;
+import org.apache.beam.sdk.testing.TestPipelineOptions;
+import org.apache.beam.sdk.testutils.metrics.MetricsReader;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.ParDo;
+import 
org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
+import org.joda.time.Duration;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class SolaceIOIT {
+  private static final String NAMESPACE = SolaceIOIT.class.getName();
+  private static final String READ_COUNT = "read_count";
+  private static SolaceContainerManager solaceContainerManager;
+  private static final TestPipelineOptions readPipelineOptions;
+
+  static {
+    readPipelineOptions = 
PipelineOptionsFactory.create().as(TestPipelineOptions.class);
+    readPipelineOptions.setBlockOnRun(false);
+    readPipelineOptions.as(TestPipelineOptions.class).setBlockOnRun(false);
+    readPipelineOptions.as(StreamingOptions.class).setStreaming(false);
+  }
+
+  @Rule public final TestPipeline readPipeline = 
TestPipeline.fromOptions(readPipelineOptions);
+
+  @BeforeClass
+  public static void setup() {
+    solaceContainerManager = new SolaceContainerManager();
+    solaceContainerManager.start();
+  }
+
+  @AfterClass
+  public static void afterClass() {
+    if (solaceContainerManager != null) {
+      solaceContainerManager.stop();
+    }
+  }
+
+  @Test
+  public void testRead() {
+    String queueName = "test_queue";
+    solaceContainerManager.createQueueWithSubscriptionTopic(queueName);
+
+    // todo this is very slow, needs to be replaced with the SolaceIO.write 
connector.

Review Comment:
   What I actually meant here is that this method may not be ideal for 
performance testing with a large number of messages, as it might prove too 
slow. Parallelization for thousands of messages would likely offer too little 
improvement. For performance testing we need the write connector, which will 
come later.
   
   For the current use case with 20 messages, the 2-second processing time on 
my machine might seem slightly slow for a quick test run. However, considering 
the overall Testcontainers setup time, this delay is relatively minor. WDYT?



-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to