[TEST] Add more logging to TruncatedRecoveryTests

This commit is contained in:
Simon Willnauer 2015-03-19 23:17:48 -07:00
parent f14e226e82
commit 780fe57a2c
1 changed files with 2 additions and 1 deletions

View File

@ -124,7 +124,8 @@ public class TruncatedRecoveryTests extends ElasticsearchIntegrationTest {
public void sendRequest(DiscoveryNode node, long requestId, String action, TransportRequest request, TransportRequestOptions options) throws IOException, TransportException {
if (action.equals(RecoveryTarget.Actions.FILE_CHUNK)) {
RecoveryFileChunkRequest req = (RecoveryFileChunkRequest) request;
if ((req.name().endsWith("cfs") || req.name().endsWith("fdt"))&& req.lastChunk() && truncate.get()) {
logger.debug("file chunk [" + req.toString() + "] lastChunk: " + req.lastChunk());
if ((req.name().endsWith("cfs") || req.name().endsWith("fdt")) && req.lastChunk() && truncate.get()) {
latch.countDown();
throw new RuntimeException("Caused some truncated files for fun and profit");
}