コード例 #1
0
 @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();
 }
コード例 #2
0
 @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();
 }
コード例 #3
0
  @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();
  }
コード例 #4
0
 @AfterMethod
 public void closeServers() {
   closeAllNodes();
 }
コード例 #5
0
 @AfterClass
 public void closeServers() {
   client1.close();
   client2.close();
   closeAllNodes();
 }