// Path: src/integration-test/java/org/xbib/elasticsearch/helper/client/ingest/IngestTransportDuplicateIDTest.java
// public class IngestTransportDuplicateIDTest extends NodeTestUtils {
// 
//     private final static ESLogger logger = ESLoggerFactory.getLogger(IngestTransportDuplicateIDTest.class.getSimpleName());
// 
//     private final static Long MAX_ACTIONS = 1000L;
// 
//     private final static Long NUM_ACTIONS = 12345L;
// 
//     @Test
//     public void testDuplicateDocIDs() throws Exception {
//         long numactions = NUM_ACTIONS;
//         final IngestTransportClient client = ClientBuilder.builder()
//                 .put(getSettings())
//                 .put(ClientBuilder.MAX_ACTIONS_PER_REQUEST, MAX_ACTIONS)
//                 .setMetric(new LongAdderIngestMetric())
//                 .toIngestTransportClient();
//         try {
//             client.newIndex("test");
//             client.waitForCluster("GREEN", TimeValue.timeValueSeconds(30));
//             for (int i = 0; i < NUM_ACTIONS; i++) {
//                 client.index("test", "test", randomString(1), "{ \"name\" : \"" + randomString(32) + "\"}");
//             }
//             client.flushIngest();
//             logger.info("flushed, waiting for responses");
//             client.waitForResponses(TimeValue.timeValueSeconds(30));
//             logger.info("refreshing");
//             client.refreshIndex("test");
//             logger.info("searching");
//             SearchRequestBuilder searchRequestBuilder = new SearchRequestBuilder(client.client(), SearchAction.INSTANCE)
//                     .setIndices("test")
//                     .setTypes("test")
//                     .setQuery(matchAllQuery());
//             long hits = searchRequestBuilder.execute().actionGet().getHits().getTotalHits();
//             logger.info("hits = {}", hits);
//             assertTrue(hits < NUM_ACTIONS);
//         } catch (NoNodeAvailableException e) {
//             logger.warn("skipping, no node available");
//         } catch (Throwable t) {
//             logger.error("oops", t);
//         } finally {
//             logger.info("shutting down client");
//             client.shutdown();
//             assertEquals(numactions, client.getMetric().getSucceeded().getCount());
//             if (client.hasThrowable()) {
//                 logger.error("error", client.getThrowable());
//             }
//             assertFalse(client.hasThrowable());
//             logger.info("done");
//         }
//     }
// }


import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportClientTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportDuplicateIDTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportReplicaTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportUpdateReplicaLevelTest;
package suites;


@RunWith(ListenerSuite.class)
@Suite.SuiteClasses({
        IngestTransportClientTest.class,
// Path: src/integration-test/java/org/xbib/elasticsearch/helper/client/ingest/IngestTransportDuplicateIDTest.java
// public class IngestTransportDuplicateIDTest extends NodeTestUtils {
// 
//     private final static ESLogger logger = ESLoggerFactory.getLogger(IngestTransportDuplicateIDTest.class.getSimpleName());
// 
//     private final static Long MAX_ACTIONS = 1000L;
// 
//     private final static Long NUM_ACTIONS = 12345L;
// 
//     @Test
//     public void testDuplicateDocIDs() throws Exception {
//         long numactions = NUM_ACTIONS;
//         final IngestTransportClient client = ClientBuilder.builder()
//                 .put(getSettings())
//                 .put(ClientBuilder.MAX_ACTIONS_PER_REQUEST, MAX_ACTIONS)
//                 .setMetric(new LongAdderIngestMetric())
//                 .toIngestTransportClient();
//         try {
//             client.newIndex("test");
//             client.waitForCluster("GREEN", TimeValue.timeValueSeconds(30));
//             for (int i = 0; i < NUM_ACTIONS; i++) {
//                 client.index("test", "test", randomString(1), "{ \"name\" : \"" + randomString(32) + "\"}");
//             }
//             client.flushIngest();
//             logger.info("flushed, waiting for responses");
//             client.waitForResponses(TimeValue.timeValueSeconds(30));
//             logger.info("refreshing");
//             client.refreshIndex("test");
//             logger.info("searching");
//             SearchRequestBuilder searchRequestBuilder = new SearchRequestBuilder(client.client(), SearchAction.INSTANCE)
//                     .setIndices("test")
//                     .setTypes("test")
//                     .setQuery(matchAllQuery());
//             long hits = searchRequestBuilder.execute().actionGet().getHits().getTotalHits();
//             logger.info("hits = {}", hits);
//             assertTrue(hits < NUM_ACTIONS);
//         } catch (NoNodeAvailableException e) {
//             logger.warn("skipping, no node available");
//         } catch (Throwable t) {
//             logger.error("oops", t);
//         } finally {
//             logger.info("shutting down client");
//             client.shutdown();
//             assertEquals(numactions, client.getMetric().getSucceeded().getCount());
//             if (client.hasThrowable()) {
//                 logger.error("error", client.getThrowable());
//             }
//             assertFalse(client.hasThrowable());
//             logger.info("done");
//         }
//     }
// }


// Path: src/integration-test/java/suites/IngestTransportTestSuite.java
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportClientTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportDuplicateIDTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportReplicaTest;
import org.xbib.elasticsearch.helper.client.ingest.IngestTransportUpdateReplicaLevelTest;

package suites;


@RunWith(ListenerSuite.class)
@Suite.SuiteClasses({
        IngestTransportClientTest.class,
        IngestTransportDuplicateIDTest.class,