deubg logging to TruncateTranslogIT

To see what data paths are used.
This commit is contained in:
Boaz Leskes 2017-07-17 17:17:36 +02:00
parent 949db39fad
commit c0751c8650
1 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,7 @@ import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.engine.MockEngineSupport;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.test.transport.MockTransportService;
import java.io.IOException;
@ -82,6 +83,7 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.notNullValue;
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0)
@TestLogging("_root:DEBUG")
public class TruncateTranslogIT extends ESIntegTestCase {
@Override
@ -108,8 +110,8 @@ public class TruncateTranslogIT extends ESIntegTestCase {
));
// Index some documents
logger.info("--> indexing more doc to be kept");
int numDocsToKeep = randomIntBetween(0, 100);
logger.info("--> indexing [{}] docs to be kept", numDocsToKeep);
IndexRequestBuilder[] builders = new IndexRequestBuilder[numDocsToKeep];
for (int i = 0; i < builders.length; i++) {
builders[i] = client().prepareIndex("test", "type").setSource("foo", "bar");