This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 1451-external-compactions-feature
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to
refs/heads/1451-external-compactions-feature by this push:
new f5f8071 Removed ZK test expectations as the code has changed
f5f8071 is described below
commit f5f8071de9014af423468d918513ce824ace54f5
Author: Dave Marion <[email protected]>
AuthorDate: Mon Apr 26 14:00:04 2021 +0000
Removed ZK test expectations as the code has changed
---
.../java/org/apache/accumulo/compactor/CompactorTest.java | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git
a/server/compactor/src/test/java/org/apache/accumulo/compactor/CompactorTest.java
b/server/compactor/src/test/java/org/apache/accumulo/compactor/CompactorTest.java
index 2e27ffc..7b607c1 100644
---
a/server/compactor/src/test/java/org/apache/accumulo/compactor/CompactorTest.java
+++
b/server/compactor/src/test/java/org/apache/accumulo/compactor/CompactorTest.java
@@ -50,9 +50,7 @@ import org.apache.accumulo.server.fs.VolumeManagerImpl;
import org.apache.accumulo.server.rpc.ServerAddress;
import org.apache.accumulo.server.rpc.TServerUtils;
import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
import org.easymock.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -340,11 +338,8 @@ public class CompactorTest {
ServerContext ctx = PowerMock.createNiceMock(ServerContext.class);
ZooReaderWriter zrw = PowerMock.createNiceMock(ZooReaderWriter.class);
ZooKeeper zk = PowerMock.createNiceMock(ZooKeeper.class);
- Stat stat = PowerMock.createNiceMock(Stat.class);
EasyMock.expect(ctx.getZooReaderWriter()).andReturn(zrw).anyTimes();
EasyMock.expect(zrw.getZooKeeper()).andReturn(zk).anyTimes();
- EasyMock.expect(zk.exists(EasyMock.isA(String.class),
EasyMock.isA(Watcher.class)))
- .andReturn(stat);
VolumeManagerImpl vm = PowerMock.createNiceMock(VolumeManagerImpl.class);
EasyMock.expect(ctx.getVolumeManager()).andReturn(vm);
vm.close();
@@ -384,12 +379,11 @@ public class CompactorTest {
TExternalCompactionJob job =
PowerMock.createNiceMock(TExternalCompactionJob.class);
TKeyExtent extent = PowerMock.createNiceMock(TKeyExtent.class);
- EasyMock.expect(extent.getTable()).andReturn("testTable".getBytes());
+
EasyMock.expect(extent.getTable()).andReturn("testTable".getBytes()).anyTimes();
EasyMock.expect(job.isSetExternalCompactionId()).andReturn(true).anyTimes();
EasyMock.expect(job.getExternalCompactionId()).andReturn(eci.toString()).anyTimes();
EasyMock.expect(job.getExtent()).andReturn(extent).anyTimes();
-
EasyMock.expect(extent.getTable()).andReturn("testTable".getBytes()).anyTimes();
AccumuloConfiguration conf =
PowerMock.createNiceMock(AccumuloConfiguration.class);
EasyMock.expect(conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT)).andReturn(86400000L);
@@ -397,11 +391,8 @@ public class CompactorTest {
ServerContext ctx = PowerMock.createNiceMock(ServerContext.class);
ZooReaderWriter zrw = PowerMock.createNiceMock(ZooReaderWriter.class);
ZooKeeper zk = PowerMock.createNiceMock(ZooKeeper.class);
- Stat stat = PowerMock.createNiceMock(Stat.class);
EasyMock.expect(ctx.getZooReaderWriter()).andReturn(zrw).anyTimes();
EasyMock.expect(zrw.getZooKeeper()).andReturn(zk).anyTimes();
- EasyMock.expect(zk.exists(EasyMock.isA(String.class),
EasyMock.isA(Watcher.class)))
- .andReturn(stat);
VolumeManagerImpl vm = PowerMock.createNiceMock(VolumeManagerImpl.class);
EasyMock.expect(ctx.getVolumeManager()).andReturn(vm);
vm.close();
@@ -453,11 +444,8 @@ public class CompactorTest {
ServerContext ctx = PowerMock.createNiceMock(ServerContext.class);
ZooReaderWriter zrw = PowerMock.createNiceMock(ZooReaderWriter.class);
ZooKeeper zk = PowerMock.createNiceMock(ZooKeeper.class);
- Stat stat = PowerMock.createNiceMock(Stat.class);
EasyMock.expect(ctx.getZooReaderWriter()).andReturn(zrw).anyTimes();
EasyMock.expect(zrw.getZooKeeper()).andReturn(zk).anyTimes();
- EasyMock.expect(zk.exists(EasyMock.isA(String.class),
EasyMock.isA(Watcher.class)))
- .andReturn(stat);
VolumeManagerImpl vm = PowerMock.createNiceMock(VolumeManagerImpl.class);
EasyMock.expect(ctx.getVolumeManager()).andReturn(vm);
vm.close();