deubg logging to TruncateTranslogIT
To see what data paths are used.
This commit is contained in:
parent
949db39fad
commit
c0751c8650
|
@ -56,6 +56,7 @@ import org.elasticsearch.plugins.Plugin;
|
||||||
import org.elasticsearch.test.ESIntegTestCase;
|
import org.elasticsearch.test.ESIntegTestCase;
|
||||||
import org.elasticsearch.test.InternalTestCluster;
|
import org.elasticsearch.test.InternalTestCluster;
|
||||||
import org.elasticsearch.test.engine.MockEngineSupport;
|
import org.elasticsearch.test.engine.MockEngineSupport;
|
||||||
|
import org.elasticsearch.test.junit.annotations.TestLogging;
|
||||||
import org.elasticsearch.test.transport.MockTransportService;
|
import org.elasticsearch.test.transport.MockTransportService;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -82,6 +83,7 @@ import static org.hamcrest.Matchers.greaterThan;
|
||||||
import static org.hamcrest.Matchers.notNullValue;
|
import static org.hamcrest.Matchers.notNullValue;
|
||||||
|
|
||||||
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0)
|
@ESIntegTestCase.ClusterScope(scope = ESIntegTestCase.Scope.SUITE, numDataNodes = 0)
|
||||||
|
@TestLogging("_root:DEBUG")
|
||||||
public class TruncateTranslogIT extends ESIntegTestCase {
|
public class TruncateTranslogIT extends ESIntegTestCase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -108,8 +110,8 @@ public class TruncateTranslogIT extends ESIntegTestCase {
|
||||||
));
|
));
|
||||||
|
|
||||||
// Index some documents
|
// Index some documents
|
||||||
logger.info("--> indexing more doc to be kept");
|
|
||||||
int numDocsToKeep = randomIntBetween(0, 100);
|
int numDocsToKeep = randomIntBetween(0, 100);
|
||||||
|
logger.info("--> indexing [{}] docs to be kept", numDocsToKeep);
|
||||||
IndexRequestBuilder[] builders = new IndexRequestBuilder[numDocsToKeep];
|
IndexRequestBuilder[] builders = new IndexRequestBuilder[numDocsToKeep];
|
||||||
for (int i = 0; i < builders.length; i++) {
|
for (int i = 0; i < builders.length; i++) {
|
||||||
builders[i] = client().prepareIndex("test", "type").setSource("foo", "bar");
|
builders[i] = client().prepareIndex("test", "type").setSource("foo", "bar");
|
||||||
|
|
Loading…
Reference in New Issue