@BeforeMethod
 public void buildNode1() throws Exception {
   buildNode("server1");
   // since we store (by default) the index snapshot under the gateway, resetting it will reset the
   // index data as well
   ((InternalNode) node("server1")).injector().getInstance(Gateway.class).reset();
   closeAllNodes();
 }
 @After
 public void closeNodes() throws Exception {
   tearDown();
   node("server1").stop();
   // since we store (by default) the index snapshot under the gateway, resetting it will reset the
   // index data as well
   ((InternalNode) node("server1")).injector().getInstance(Gateway.class).reset();
   closeAllNodes();
 }
  @Before
  public void buildNode1() throws Exception {
    super.setUp();
    Builder builder = ImmutableSettings.builder();
    builder.put("cluster.routing.schedule", "100ms");
    builder.put("gateway.type", "fs");
    if (between(0, 5) == 0) {
      builder.put("gateway.fs.buffer_size", between(1, 100) + "kb");
    }
    if (between(0, 5) == 0) {
      builder.put("gateway.fs.chunk_size", between(1, 100) + "kb");
    }

    builder.put("index.number_of_replicas", "1");
    builder.put("index.number_of_shards", rarely() ? Integer.toString(between(2, 6)) : "1");
    storeType = rarely() ? "ram" : "fs";
    builder.put("index.store.type", storeType);
    defaultSettings = builder.build();
    buildNode("server1");
    // since we store (by default) the index snapshot under the gateway, resetting it will reset the
    // index data as well
    ((InternalNode) node("server1")).injector().getInstance(Gateway.class).reset();
    closeAllNodes();
  }
Example #4
0
 @AfterClass
 public void closeNodes() {
   client.close();
   closeAllNodes();
 }
 @AfterMethod
 public void closeNodes() {
   closeAllNodes();
   ESLoggerFactory.setDefaultFactory(mockESLoggerFactory.getRealFactory());
 }
 @AfterMethod
 public void closeServers() {
   closeAllNodes();
 }