You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/01/31 09:10:38 UTC
[hop] branch 2.0.0 updated: HOP-3427 see why unit test "testProcessRow_doesNotTruncateOnOtherRows" hangs
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch 2.0.0
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/2.0.0 by this push:
new e11ea94 HOP-3427 see why unit test "testProcessRow_doesNotTruncateOnOtherRows" hangs
new e1ceea1 Merge pull request #1307 from gvdutra/HOP-3427
e11ea94 is described below
commit e11ea9483a3873cb97f853ffaefc39b3a68c4e14
Author: Gabriel Dutra <gv...@gmail.com>
AuthorDate: Sat Jan 29 23:31:58 2022 -0800
HOP-3427 see why unit test "testProcessRow_doesNotTruncateOnOtherRows" hangs
---
.../java/org/apache/hop/pipeline/transform/BaseTransform.java | 8 +++++++-
.../hop/pipeline/transforms/tableoutput/TableOutputTest.java | 1 -
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java b/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
index 4e8d944..2ba3eb6 100644
--- a/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
+++ b/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
@@ -1022,12 +1022,18 @@ public class BaseTransform<Meta extends ITransformMeta, Data extends ITransformD
// started.
//
if (this.checkPipelineRunning == false) {
+ int counter = 0;
while (!pipeline.isRunning() && !stopped.get()) {
try {
- Thread.sleep(1);
+ Thread.sleep(1000);
+ counter++;
} catch (InterruptedException e) {
// Ignore
}
+ //wait 3s max
+ if(counter >= 3) {
+ break;
+ }
}
this.checkPipelineRunning = true;
}
diff --git a/plugins/transforms/tableoutput/src/test/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputTest.java b/plugins/transforms/tableoutput/src/test/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputTest.java
index 9eddc97..b3d9ed5 100644
--- a/plugins/transforms/tableoutput/src/test/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputTest.java
+++ b/plugins/transforms/tableoutput/src/test/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputTest.java
@@ -168,7 +168,6 @@ public class TableOutputTest {
verify(tableOutputSpy, times(1)).truncateTable();
}
- @Ignore
@Test
public void testProcessRow_doesNotTruncateOnOtherRows() throws Exception {
when(tableOutputMeta.isTruncateTable()).thenReturn(true);