[ 
https://issues.apache.org/jira/browse/BEAM-4088?focusedWorklogId=99342&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-99342
 ]

ASF GitHub Bot logged work on BEAM-4088:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 08/May/18 02:31
            Start Date: 08/May/18 02:31
    Worklog Time Spent: 10m 
      Work Description: akedin commented on a change in pull request #5300: 
[BEAM-4088] Suppress a test in ExecutorServiceParallelExecutorTest
URL: https://github.com/apache/beam/pull/5300#discussion_r186602117
 
 

 ##########
 File path: 
runners/direct-java/src/test/java/org/apache/beam/runners/direct/ExecutorServiceParallelExecutorTest.java
 ##########
 @@ -35,67 +35,67 @@
 import org.apache.beam.sdk.testing.ThreadLeakTracker;
 import org.apache.beam.sdk.transforms.DoFn;
 import org.apache.beam.sdk.transforms.ParDo;
-import org.joda.time.Duration;
 import org.joda.time.Instant;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TestName;
 import org.junit.rules.TestRule;
 
-/**
- * Validates some basic behavior for the ExecutorServiceParallelExecutor.
- */
+/** Validates some basic behavior for the ExecutorServiceParallelExecutor. */
 public class ExecutorServiceParallelExecutorTest {
 
   private static final long NUM_ELEMENTS = 1000L;
 
   private final TestPipeline pipeline = TestPipeline.create();
   private final TestRule threadLeakTracker = new ThreadLeakTracker();
 
-  @Rule
-  public final TestRule execution = 
outerRule(pipeline).around(threadLeakTracker);
+  @Rule public final TestRule execution = 
outerRule(pipeline).around(threadLeakTracker);
 
-  @Rule
-  public final TestName testName = new TestName();
+  @Rule public final TestName testName = new TestName();
 
   @Test
+  @Ignore("BEAM-4088 Test reliably fails.")
   public void ensureMetricsThreadDoesntLeak() {
-    final DirectGraph graph = DirectGraph.create(
-      emptyMap(), emptyMap(), LinkedListMultimap.create(),
-      emptySet(), emptyMap());
-    final ExecutorService metricsExecutorService = 
Executors.newSingleThreadExecutor(
-      new ThreadFactoryBuilder()
-        .setDaemon(false)
-        .setNameFormat("dontleak_" + getClass().getName() + "#" + 
testName.getMethodName())
-        .build());
+    final DirectGraph graph =
+        DirectGraph.create(
+            emptyMap(), emptyMap(), LinkedListMultimap.create(), emptySet(), 
emptyMap());
+    final ExecutorService metricsExecutorService =
+        Executors.newSingleThreadExecutor(
+            new ThreadFactoryBuilder()
+                .setDaemon(false)
+                .setNameFormat("dontleak_" + getClass().getName() + "#" + 
testName.getMethodName())
+                .build());
 
     // fake a metrics usage
     metricsExecutorService.submit(() -> {});
 
-    final EvaluationContext context = EvaluationContext.create(
-      MockClock.fromInstant(Instant.now()),
-      CloningBundleFactory.create(), graph, emptySet(), 
metricsExecutorService);
-    ExecutorServiceParallelExecutor
-      .create(
-        2, TransformEvaluatorRegistry.javaSdkNativeRegistry(context,
-              PipelineOptionsFactory.create().as(DirectOptions.class)), 
emptyMap(),
-              context,
-              metricsExecutorService)
-      .stop();
+    final EvaluationContext context =
+        EvaluationContext.create(
+            MockClock.fromInstant(Instant.now()),
+            CloningBundleFactory.create(),
+            graph,
+            emptySet(),
+            metricsExecutorService);
+    ExecutorServiceParallelExecutor.create(
+            2,
+            TransformEvaluatorRegistry.javaSdkNativeRegistry(
+                context, 
PipelineOptionsFactory.create().as(DirectOptions.class)),
+            emptyMap(),
+            context,
+            metricsExecutorService)
+        .stop();
     try {
-      metricsExecutorService.awaitTermination(10000L, TimeUnit.MILLISECONDS);
+      metricsExecutorService.awaitTermination(10L, TimeUnit.SECONDS);
     } catch (InterruptedException e) {
-      e.printStackTrace();
+      Thread.currentThread().interrupt();
+      throw new RuntimeException(e);
     }
   }
 
   @Test
-  public void test() throws Exception {
-    pipeline
-        .apply(
-            // Use maxReadTime to force unbounded mode.
-            
GenerateSequence.from(0).to(NUM_ELEMENTS).withMaxReadTime(Duration.standardDays(1)))
 
 Review comment:
   why is MaxReadTime not needed anymore?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 99342)
    Time Spent: 1h 50m  (was: 1h 40m)

> ExecutorServiceParallelExecutorTest#ensureMetricsThreadDoesntLeak in PR #4965 
> does not pass in gradle
> -----------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-4088
>                 URL: https://issues.apache.org/jira/browse/BEAM-4088
>             Project: Beam
>          Issue Type: Sub-task
>          Components: testing
>            Reporter: Etienne Chauchot
>            Assignee: Etienne Chauchot
>            Priority: Major
>             Fix For: Not applicable
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> This is a new test being added to ensure threads don't leak. The failure 
> seems to indicate that threads do leak.
> This test fails using gradle but previously passed using maven
> PR: https://github.com/apache/beam/pull/4965
> Presubmit Failure: 
>  * https://builds.apache.org/job/beam_PreCommit_Java_GradleBuild/4059/
>  * 
> https://scans.gradle.com/s/grha56432j3t2/tests/jqhvlvf72f7pg-ipde5etqqejoa?openStackTraces=WzBd



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to