You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/08/10 21:27:50 UTC

[1/3] git commit: ACCUMULO-2560 Fix broken unit test

Repository: accumulo
Updated Branches:
  refs/heads/1.6.1-SNAPSHOT 0277521da -> 07bacc346
  refs/heads/master 19de9683c -> a63ded99d


ACCUMULO-2560 Fix broken unit test


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07bacc34
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07bacc34
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07bacc34

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 07bacc346b798b1607ec4c83f9dc37a8c55e6e3e
Parents: 0277521
Author: Josh Elser <el...@apache.org>
Authored: Sun Aug 10 15:25:14 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sun Aug 10 15:25:14 2014 -0400

----------------------------------------------------------------------
 .../accumulo/gc/SimpleGarbageCollectorTest.java     | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07bacc34/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
----------------------------------------------------------------------
diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
index baa98b7..d4319b8 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
@@ -17,18 +17,23 @@
 package org.apache.accumulo.gc;
 
 import java.io.FileNotFoundException;
+
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.gc.SimpleGarbageCollector.Opts;
+
 import static org.apache.accumulo.gc.SimpleGarbageCollector.CANDIDATE_MEMORY_PERCENTAGE;
+
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.trace.thrift.TInfo;
 import org.apache.hadoop.fs.Path;
+import org.easymock.EasyMock;
 import org.junit.Before;
 import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -69,15 +74,20 @@ public class SimpleGarbageCollectorTest {
     AccumuloConfiguration systemConfig = createMock(AccumuloConfiguration.class);
     expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L);
     expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_DELAY)).andReturn(20000L);
-    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
-    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
+    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2).times(2);
     expect(systemConfig.getBoolean(Property.GC_TRASH_IGNORE)).andReturn(false);
     replay(systemConfig);
     return systemConfig;
   }
 
-  //@Test
+  @Test
   public void testInit() throws Exception {
+    EasyMock.reset(systemConfig);
+    expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L).times(2);
+    expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_DELAY)).andReturn(20000L);
+    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2).times(2);
+    expect(systemConfig.getBoolean(Property.GC_TRASH_IGNORE)).andReturn(false);
+    replay(systemConfig);
     gc.init(volMgr, instance, credentials, systemConfig);
     assertSame(volMgr, gc.getVolumeManager());
     assertSame(instance, gc.getInstance());


[3/3] git commit: Merge branch '1.6.1-SNAPSHOT'

Posted by el...@apache.org.
Merge branch '1.6.1-SNAPSHOT'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a63ded99
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a63ded99
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a63ded99

Branch: refs/heads/master
Commit: a63ded99d4903d6eb21403f218cc4ded1febf325
Parents: 19de968 07bacc3
Author: Josh Elser <el...@apache.org>
Authored: Sun Aug 10 15:25:46 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sun Aug 10 15:25:46 2014 -0400

----------------------------------------------------------------------
 .../accumulo/gc/SimpleGarbageCollectorTest.java     | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a63ded99/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
----------------------------------------------------------------------
diff --cc server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
index b18f90f,d4319b8..b776054
--- a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
@@@ -68,10 -73,8 +73,9 @@@ public class SimpleGarbageCollectorTes
    private AccumuloConfiguration mockSystemConfig() {
      AccumuloConfiguration systemConfig = createMock(AccumuloConfiguration.class);
      expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L);
 +    expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L);
      expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_DELAY)).andReturn(20000L);
-     expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
-     expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
+     expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2).times(2);
      expect(systemConfig.getBoolean(Property.GC_TRASH_IGNORE)).andReturn(false);
      replay(systemConfig);
      return systemConfig;


[2/3] git commit: ACCUMULO-2560 Fix broken unit test

Posted by el...@apache.org.
ACCUMULO-2560 Fix broken unit test


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07bacc34
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07bacc34
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07bacc34

Branch: refs/heads/master
Commit: 07bacc346b798b1607ec4c83f9dc37a8c55e6e3e
Parents: 0277521
Author: Josh Elser <el...@apache.org>
Authored: Sun Aug 10 15:25:14 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sun Aug 10 15:25:14 2014 -0400

----------------------------------------------------------------------
 .../accumulo/gc/SimpleGarbageCollectorTest.java     | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07bacc34/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
----------------------------------------------------------------------
diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
index baa98b7..d4319b8 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
@@ -17,18 +17,23 @@
 package org.apache.accumulo.gc;
 
 import java.io.FileNotFoundException;
+
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.gc.SimpleGarbageCollector.Opts;
+
 import static org.apache.accumulo.gc.SimpleGarbageCollector.CANDIDATE_MEMORY_PERCENTAGE;
+
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.trace.thrift.TInfo;
 import org.apache.hadoop.fs.Path;
+import org.easymock.EasyMock;
 import org.junit.Before;
 import org.junit.Test;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -69,15 +74,20 @@ public class SimpleGarbageCollectorTest {
     AccumuloConfiguration systemConfig = createMock(AccumuloConfiguration.class);
     expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L);
     expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_DELAY)).andReturn(20000L);
-    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
-    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2);
+    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2).times(2);
     expect(systemConfig.getBoolean(Property.GC_TRASH_IGNORE)).andReturn(false);
     replay(systemConfig);
     return systemConfig;
   }
 
-  //@Test
+  @Test
   public void testInit() throws Exception {
+    EasyMock.reset(systemConfig);
+    expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_START)).andReturn(1000L).times(2);
+    expect(systemConfig.getTimeInMillis(Property.GC_CYCLE_DELAY)).andReturn(20000L);
+    expect(systemConfig.getCount(Property.GC_DELETE_THREADS)).andReturn(2).times(2);
+    expect(systemConfig.getBoolean(Property.GC_TRASH_IGNORE)).andReturn(false);
+    replay(systemConfig);
     gc.init(volMgr, instance, credentials, systemConfig);
     assertSame(volMgr, gc.getVolumeManager());
     assertSame(instance, gc.getInstance());