This is an automated email from the ASF dual-hosted git repository.
cgivre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push:
new d96dcc5 DRILL-7859: Junit test random failure when the numbers of
splunk event was insufficient
d96dcc5 is described below
commit d96dcc5b91b6f321efff29bce6be01d9dc53b390
Author: luocooong <[email protected]>
AuthorDate: Fri Feb 12 21:23:31 2021 +0800
DRILL-7859: Junit test random failure when the numbers of splunk event was
insufficient
---
.../java/org/apache/drill/exec/store/splunk/SplunkPluginTest.java | 4 +++-
.../test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git
a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkPluginTest.java
b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkPluginTest.java
index 4e2ee80..254a96c 100644
---
a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkPluginTest.java
+++
b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkPluginTest.java
@@ -25,14 +25,17 @@ import org.apache.drill.exec.physical.rowSet.RowSetBuilder;
import org.apache.drill.exec.record.metadata.SchemaBuilder;
import org.apache.drill.exec.record.metadata.TupleMetadata;
import org.apache.drill.test.rowSet.RowSetUtilities;
+import org.junit.FixMethodOrder;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+@FixMethodOrder(MethodSorters.JVM)
@Category({SlowTest.class})
public class SplunkPluginTest extends SplunkBaseTest {
@@ -177,7 +180,6 @@ public class SplunkPluginTest extends SplunkBaseTest {
public void testExplicitFieldsWithOneFieldLimitQuery() throws Exception {
String sql = "SELECT `component` FROM splunk.`_introspection` ORDER BY
`component` LIMIT 2";
RowSet results = client.queryBuilder().sql(sql).rowSet();
- results.print();
TupleMetadata expectedSchema = new SchemaBuilder()
.add("component", TypeProtos.MinorType.VARCHAR,
TypeProtos.DataMode.OPTIONAL)
diff --git
a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java
b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java
index 91fb89d..5dcbda2 100644
---
a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java
+++
b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java
@@ -75,6 +75,8 @@ public class SplunkTestSuite extends ClusterTest {
SPLUNK_STORAGE_PLUGIN_CONFIG.setEnabled(true);
pluginRegistry.put(SplunkPluginConfig.NAME,
SPLUNK_STORAGE_PLUGIN_CONFIG);
runningSuite = true;
+ logger.info("Take a time to ready more Splunk events (3 sec)...");
+ Thread.sleep(3000);
}
initCount.incrementAndGet();
runningSuite = true;