Fix broken test
Randomized testing requires that we clean all the static state in test classess.
This commit is contained in:
parent
8804035205
commit
eb9b84e6c3
|
@ -37,6 +37,7 @@ import org.elasticsearch.snapshots.Snapshot;
|
||||||
import org.elasticsearch.snapshots.SnapshotId;
|
import org.elasticsearch.snapshots.SnapshotId;
|
||||||
import org.elasticsearch.test.ESTestCase;
|
import org.elasticsearch.test.ESTestCase;
|
||||||
import org.elasticsearch.test.VersionUtils;
|
import org.elasticsearch.test.VersionUtils;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -69,6 +70,11 @@ public class ShardSearchTransportRequestTests extends ESTestCase {
|
||||||
namedWriteableRegistry = new NamedWriteableRegistry(entries);
|
namedWriteableRegistry = new NamedWriteableRegistry(entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void afterClass() {
|
||||||
|
namedWriteableRegistry = null;
|
||||||
|
}
|
||||||
|
|
||||||
public void testSerialization() throws Exception {
|
public void testSerialization() throws Exception {
|
||||||
ShardSearchTransportRequest shardSearchTransportRequest = createShardSearchTransportRequest();
|
ShardSearchTransportRequest shardSearchTransportRequest = createShardSearchTransportRequest();
|
||||||
try (BytesStreamOutput output = new BytesStreamOutput()) {
|
try (BytesStreamOutput output = new BytesStreamOutput()) {
|
||||||
|
|
Loading…
Reference in New Issue