Fix broken test

Randomized testing requires that we clean all the static state
in test classess.
This commit is contained in:
Nik Everett 2016-08-15 17:27:01 -04:00
parent 8804035205
commit eb9b84e6c3
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,7 @@ import org.elasticsearch.snapshots.Snapshot;
import org.elasticsearch.snapshots.SnapshotId;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import java.io.IOException;
@ -69,6 +70,11 @@ public class ShardSearchTransportRequestTests extends ESTestCase {
namedWriteableRegistry = new NamedWriteableRegistry(entries);
}
@AfterClass
public static void afterClass() {
namedWriteableRegistry = null;
}
public void testSerialization() throws Exception {
ShardSearchTransportRequest shardSearchTransportRequest = createShardSearchTransportRequest();
try (BytesStreamOutput output = new BytesStreamOutput()) {