Repository: incubator-tephra Updated Branches: refs/heads/master 5e342230d -> 8e5ef26ad
Reduce log level of some test classes This closes #3 on GitHub. Signed-off-by: poorna <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-tephra/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tephra/commit/8e5ef26a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tephra/tree/8e5ef26a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tephra/diff/8e5ef26a Branch: refs/heads/master Commit: 8e5ef26ad22f5fbdf31eaddb96cb61a7571e3f37 Parents: 61d2c08 Author: poorna <[email protected]> Authored: Wed Sep 7 01:08:43 2016 -0700 Committer: poorna <[email protected]> Committed: Wed Sep 7 12:59:27 2016 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/tephra/examples/BalanceBooks.java | 4 ++-- .../java/org/apache/tephra/examples/BalanceBooksTest.java | 7 ++++++- .../org/apache/tephra/hbase/TransactionAwareHTableTest.java | 2 -- .../org/apache/tephra/hbase/TransactionAwareHTableTest.java | 2 -- .../org/apache/tephra/hbase/TransactionAwareHTableTest.java | 2 -- .../org/apache/tephra/hbase/TransactionAwareHTableTest.java | 2 -- .../org/apache/tephra/hbase/TransactionAwareHTableTest.java | 2 -- 7 files changed, 8 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-examples/src/main/java/org/apache/tephra/examples/BalanceBooks.java ---------------------------------------------------------------------- diff --git a/tephra-examples/src/main/java/org/apache/tephra/examples/BalanceBooks.java b/tephra-examples/src/main/java/org/apache/tephra/examples/BalanceBooks.java index b2fbf14..f6b7ff8 100644 --- a/tephra-examples/src/main/java/org/apache/tephra/examples/BalanceBooks.java +++ b/tephra-examples/src/main/java/org/apache/tephra/examples/BalanceBooks.java @@ -293,7 +293,7 @@ public class BalanceBooks implements Closeable { setBalance(withdrawee, withdraweeNew); setBalance(id, ownNew); - LOG.info("Client #{}: Withdrew ${} from #{}; withdrawee old={}, new={}; own old={}, new={}", + LOG.debug("Client #{}: Withdrew ${} from #{}; withdrawee old={}, new={}; own old={}, new={}", id, amount, withdrawee, withdraweeBalance, withdraweeNew, ownBalance, ownNew); txContext.finish(); @@ -301,7 +301,7 @@ public class BalanceBooks implements Closeable { LOG.error("Client #{}: Unhandled client failure", id, ioe); txContext.abort(); } catch (TransactionConflictException tce) { - LOG.info("CONFLICT: client #{} attempting to withdraw from #{}", id, withdrawee); + LOG.debug("CONFLICT: client #{} attempting to withdraw from #{}", id, withdrawee); txContext.abort(tce); } catch (TransactionFailureException tfe) { LOG.error("Client #{}: Unhandled transaction failure", id, tfe); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-examples/src/test/java/org/apache/tephra/examples/BalanceBooksTest.java ---------------------------------------------------------------------- diff --git a/tephra-examples/src/test/java/org/apache/tephra/examples/BalanceBooksTest.java b/tephra-examples/src/test/java/org/apache/tephra/examples/BalanceBooksTest.java index 533b788..3be1c43 100644 --- a/tephra-examples/src/test/java/org/apache/tephra/examples/BalanceBooksTest.java +++ b/tephra-examples/src/test/java/org/apache/tephra/examples/BalanceBooksTest.java @@ -37,7 +37,9 @@ import org.apache.tephra.runtime.ZKModule; import org.apache.twill.zookeeper.ZKClientService; import org.junit.AfterClass; import org.junit.BeforeClass; +import org.junit.ClassRule; import org.junit.Test; +import org.junit.rules.TemporaryFolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,12 +54,15 @@ public class BalanceBooksTest { private static TransactionService txService; private static ZKClientService zkClientService; + @ClassRule + public static TemporaryFolder tmpFolder = new TemporaryFolder(); + @BeforeClass public static void setup() throws Exception { testUtil = new HBaseTestingUtility(); Configuration conf = testUtil.getConfiguration(); conf.setBoolean(TxConstants.Manager.CFG_DO_PERSIST, false); - conf.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, "/tx.snapshot"); + conf.set(TxConstants.Manager.CFG_TX_SNAPSHOT_DIR, tmpFolder.newFolder().getAbsolutePath()); // Tune down the connection thread pool size conf.setInt("hbase.hconnection.threads.core", 5); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java ---------------------------------------------------------------------- diff --git a/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java b/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java index ea7a1f6..7efdd2d 100644 --- a/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java +++ b/tephra-hbase-compat-0.96/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java @@ -328,7 +328,6 @@ public class TransactionAwareHTableTest { Delete d = new Delete(Bytes.toBytes("row" + i)); for (int j = 0; j < 10; j++) { if (i % 2 == j % 2) { - LOG.info("Deleting row={}, column={}", i, j); d.deleteColumns(TestBytes.family, Bytes.toBytes(j)); } } @@ -344,7 +343,6 @@ public class TransactionAwareHTableTest { assertEquals(5, r.size()); for (Map.Entry<byte[], byte[]> entry : r.getFamilyMap(TestBytes.family).entrySet()) { int col = Bytes.toInt(entry.getKey()); - LOG.info("Got row={}, col={}", i, col); // each row should only have the opposite mod (odd=even, even=odd) assertNotEquals(i % 2, col % 2); assertArrayEquals(TestBytes.value, entry.getValue()); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java ---------------------------------------------------------------------- diff --git a/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java b/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java index d64f34a..02a8b7d 100644 --- a/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java +++ b/tephra-hbase-compat-0.98/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java @@ -327,7 +327,6 @@ public class TransactionAwareHTableTest { Delete d = new Delete(Bytes.toBytes("row" + i)); for (int j = 0; j < 10; j++) { if (i % 2 == j % 2) { - LOG.info("Deleting row={}, column={}", i, j); d.deleteColumns(TestBytes.family, Bytes.toBytes(j)); } } @@ -343,7 +342,6 @@ public class TransactionAwareHTableTest { assertEquals(5, r.size()); for (Map.Entry<byte[], byte[]> entry : r.getFamilyMap(TestBytes.family).entrySet()) { int col = Bytes.toInt(entry.getKey()); - LOG.info("Got row={}, col={}", i, col); // each row should only have the opposite mod (odd=even, even=odd) assertNotEquals(i % 2, col % 2); assertArrayEquals(TestBytes.value, entry.getValue()); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java ---------------------------------------------------------------------- diff --git a/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java b/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java index 95c4939..b781a9a 100644 --- a/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java +++ b/tephra-hbase-compat-1.0-cdh/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java @@ -327,7 +327,6 @@ public class TransactionAwareHTableTest { Delete d = new Delete(Bytes.toBytes("row" + i)); for (int j = 0; j < 10; j++) { if (i % 2 == j % 2) { - LOG.info("Deleting row={}, column={}", i, j); d.deleteColumns(TestBytes.family, Bytes.toBytes(j)); } } @@ -343,7 +342,6 @@ public class TransactionAwareHTableTest { assertEquals(5, r.size()); for (Map.Entry<byte[], byte[]> entry : r.getFamilyMap(TestBytes.family).entrySet()) { int col = Bytes.toInt(entry.getKey()); - LOG.info("Got row={}, col={}", i, col); // each row should only have the opposite mod (odd=even, even=odd) assertNotEquals(i % 2, col % 2); assertArrayEquals(TestBytes.value, entry.getValue()); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java ---------------------------------------------------------------------- diff --git a/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java b/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java index e85c1a7..6dc7c28 100644 --- a/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java +++ b/tephra-hbase-compat-1.0/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java @@ -327,7 +327,6 @@ public class TransactionAwareHTableTest { Delete d = new Delete(Bytes.toBytes("row" + i)); for (int j = 0; j < 10; j++) { if (i % 2 == j % 2) { - LOG.info("Deleting row={}, column={}", i, j); d.deleteColumns(TestBytes.family, Bytes.toBytes(j)); } } @@ -343,7 +342,6 @@ public class TransactionAwareHTableTest { assertEquals(5, r.size()); for (Map.Entry<byte[], byte[]> entry : r.getFamilyMap(TestBytes.family).entrySet()) { int col = Bytes.toInt(entry.getKey()); - LOG.info("Got row={}, col={}", i, col); // each row should only have the opposite mod (odd=even, even=odd) assertNotEquals(i % 2, col % 2); assertArrayEquals(TestBytes.value, entry.getValue()); http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/8e5ef26a/tephra-hbase-compat-1.1/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java ---------------------------------------------------------------------- diff --git a/tephra-hbase-compat-1.1/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java b/tephra-hbase-compat-1.1/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java index e9885c4..de1fa6b 100644 --- a/tephra-hbase-compat-1.1/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java +++ b/tephra-hbase-compat-1.1/src/test/java/org/apache/tephra/hbase/TransactionAwareHTableTest.java @@ -326,7 +326,6 @@ public class TransactionAwareHTableTest { Delete d = new Delete(Bytes.toBytes("row" + i)); for (int j = 0; j < 10; j++) { if (i % 2 == j % 2) { - LOG.info("Deleting row={}, column={}", i, j); d.deleteColumns(TestBytes.family, Bytes.toBytes(j)); } } @@ -342,7 +341,6 @@ public class TransactionAwareHTableTest { assertEquals(5, r.size()); for (Map.Entry<byte[], byte[]> entry : r.getFamilyMap(TestBytes.family).entrySet()) { int col = Bytes.toInt(entry.getKey()); - LOG.info("Got row={}, col={}", i, col); // each row should only have the opposite mod (odd=even, even=odd) assertNotEquals(i % 2, col % 2); assertArrayEquals(TestBytes.value, entry.getValue());
