Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
Randomized testing requires that we clean all the static state
in test classess.
  • Loading branch information
nik9000 committed Aug 15, 2016
1 parent 8804035 commit eb9b84e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
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;
Expand Down Expand Up @@ -69,6 +70,11 @@ protected void configureSearch() {
namedWriteableRegistry = new NamedWriteableRegistry(entries);
}

@AfterClass
public static void afterClass() {
namedWriteableRegistry = null;
}

public void testSerialization() throws Exception {
ShardSearchTransportRequest shardSearchTransportRequest = createShardSearchTransportRequest();
try (BytesStreamOutput output = new BytesStreamOutput()) {
Expand Down

0 comments on commit eb9b84e

Please sign in to comment.