accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch main updated: Modify IteratorEnvIT to expose bug
Date Tue, 03 Nov 2020 19:07:34 GMT
This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 02f778a  Modify IteratorEnvIT to expose bug
02f778a is described below

commit 02f778a87bc74659dac45b9caf278bd7267e0dad
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Tue Nov 3 13:57:46 2020 -0500

    Modify IteratorEnvIT to expose bug
    
    * IteratorEnvIT had flawed logic that was masking a bug in the
    implementation of IteratorEnvironment
    * IteratorEnvironment.getPluginEnv() is not impl and currently throws an
    UnsupportedOperationException
---
 test/src/main/java/org/apache/accumulo/test/IteratorEnvIT.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/src/main/java/org/apache/accumulo/test/IteratorEnvIT.java b/test/src/main/java/org/apache/accumulo/test/IteratorEnvIT.java
index f64afe3..6965b69 100644
--- a/test/src/main/java/org/apache/accumulo/test/IteratorEnvIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/IteratorEnvIT.java
@@ -146,10 +146,14 @@ public class IteratorEnvIT extends AccumuloClusterHarness {
   private static void testEnv(IteratorScope scope, Map<String,String> opts,
       IteratorEnvironment env) {
     TableId expectedTableId = TableId.of(opts.get("expected.table.id"));
-    if (!"value1".equals(env.getConfig().get("table.custom.iterator.env.test")) &&
!"value1".equals(
+    if (!"value1".equals(env.getConfig().get("table.custom.iterator.env.test")))
+      throw new RuntimeException("Test failed - Expected table property not found.");
+    if (!"value1".equals(
         env.getServiceEnv().getConfiguration(env.getTableId()).getTableCustom("iterator.env.test")))
       throw new RuntimeException("Test failed - Expected table property not found.");
-    if (!"value1".equals(env.getConfig().get("table.custom.iterator.env.test")) &&
!"value1".equals(
+    if (!"value1".equals(env.getConfig().get("table.custom.iterator.env.test")))
+      throw new RuntimeException("Test failed - Expected table property not found.");
+    if (!"value1".equals(
         env.getPluginEnv().getConfiguration(env.getTableId()).getTableCustom("iterator.env.test")))
       throw new RuntimeException("Test failed - Expected table property not found.");
     if (!scope.equals(env.getIteratorScope()))


Mime
View raw message