Skip to content

Commit

Permalink
add ThreadLeakFilter to RecoveryTests
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Feb 24, 2015
1 parent ff9b8e5 commit f2c837c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions blob/src/test/java/io/crate/integrationtests/RecoveryTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

package io.crate.integrationtests;

import com.carrotsearch.randomizedtesting.ThreadFilter;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import io.crate.blob.PutChunkAction;
import io.crate.blob.PutChunkRequest;
import io.crate.blob.StartBlobAction;
Expand All @@ -43,6 +45,7 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.test.ElasticsearchThreadFilter;
import org.junit.Test;

import java.security.MessageDigest;
Expand All @@ -60,8 +63,16 @@
import static org.hamcrest.core.IsEqual.equalTo;

@CrateIntegrationTest.ClusterScope(scope = CrateIntegrationTest.Scope.SUITE, numNodes = 0)
@ThreadLeakFilters(defaultFilters = true, filters = {ElasticsearchThreadFilter.class, RecoveryTests.RecoveryTestThreadFilter.class})
public class RecoveryTests extends CrateIntegrationTest {

public static class RecoveryTestThreadFilter implements ThreadFilter {
@Override
public boolean reject(Thread t) {
return (t.getName().contains("blob-uploader"));
}
}

private final TimeValue ACCEPTABLE_RELOCATION_TIME = new TimeValue(25, TimeUnit.MINUTES);

// the time to sleep between chunk requests in upload
Expand Down

0 comments on commit f2c837c

Please sign in to comment.