@Test public void corruptedIndexRecovery() throws Throwable { setUpHost(false); this.doDurableServiceUpdate(Action.PUT, MinimalTestService.class, 100, 2, null); Thread.sleep(this.host.getMaintenanceIntervalMicros() / 1000);
@Test public void corruptedIndexRecovery() throws Throwable { setUpHost(false); this.doDurableServiceUpdate(Action.PUT, MinimalTestService.class, 100, 2, null); Thread.sleep(this.host.getMaintenanceIntervalMicros() / 1000);
@Test public void throughputPut() throws Throwable { int serviceThreshold = LuceneDocumentIndexService.getVersionRetentionServiceThreshold(); long limit = MinimalTestService.getVersionRetentionLimit(); long floor = MinimalTestService.getVersionRetentionFloor(); try { setUpHost(false); LuceneDocumentIndexService.setVersionRetentionServiceThreshold((int) this.serviceCount); MinimalTestService.setVersionRetentionLimit(this.retentionLimit); MinimalTestService.setVersionRetentionFloor(this.retentionFloor); if (this.host.isStressTest()) { Utils.setTimeDriftThreshold(TimeUnit.HOURS.toMicros(1)); } // Do throughput testing for basic, mutable services doDurableServiceUpdate(Action.PUT, MinimalTestService.class, this.serviceCount, this.updateCount, null); // Now do the same test for a similar service with indexed metadata doDurableServiceUpdate(Action.PUT, MinimalTestServiceWithIndexedMetadata.class, this.serviceCount, this.updateCount, null); } finally { Utils.setTimeDriftThreshold(Utils.DEFAULT_TIME_DRIFT_THRESHOLD_MICROS); MinimalTestService.setVersionRetentionLimit(limit); MinimalTestService.setVersionRetentionFloor(floor); LuceneDocumentIndexService.setVersionRetentionServiceThreshold(serviceThreshold); } }
@Test public void throughputPut() throws Throwable { int serviceThreshold = LuceneDocumentIndexService.getVersionRetentionServiceThreshold(); long limit = MinimalTestService.getVersionRetentionLimit(); long floor = MinimalTestService.getVersionRetentionFloor(); try { setUpHost(false); LuceneDocumentIndexService.setVersionRetentionServiceThreshold((int) this.serviceCount); MinimalTestService.setVersionRetentionLimit(this.retentionLimit); MinimalTestService.setVersionRetentionFloor(this.retentionFloor); if (this.host.isStressTest()) { Utils.setTimeDriftThreshold(TimeUnit.HOURS.toMicros(1)); } // Do throughput testing for basic, mutable services doDurableServiceUpdate(Action.PUT, MinimalTestService.class, this.serviceCount, this.updateCount, null); // Now do the same test for a similar service with indexed metadata doDurableServiceUpdate(Action.PUT, MinimalTestServiceWithIndexedMetadata.class, this.serviceCount, this.updateCount, null); } finally { Utils.setTimeDriftThreshold(Utils.DEFAULT_TIME_DRIFT_THRESHOLD_MICROS); MinimalTestService.setVersionRetentionLimit(limit); MinimalTestService.setVersionRetentionFloor(floor); LuceneDocumentIndexService.setVersionRetentionServiceThreshold(serviceThreshold); } }