Revert "Test: get more information when sporadic NPE"

This reverts commit elastic/x-pack-elasticsearch@3e08725fc7.

Original commit: elastic/x-pack-elasticsearch@dc85c2b194
This commit is contained in:
Yannick Welsch 2017-04-29 10:51:35 +02:00
parent 308d5e0ae3
commit a9aa3e2329
1 changed files with 1 additions and 8 deletions

View File

@ -6,13 +6,11 @@
package org.elasticsearch.license;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ack.ClusterStateUpdateResponse;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.test.junit.annotations.TestLogging;
import org.elasticsearch.xpack.XPackPlugin;
import org.elasticsearch.xpack.XPackSettings;
import org.elasticsearch.xpack.XPackSingleNodeTestCase;
@ -26,7 +24,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
@TestLogging("_root:DEBUG") // So we can get more logging for https://github.com/elastic/x-pack-elasticsearch/issues/222
public class LicensesManagerServiceTests extends XPackSingleNodeTestCase {
@Override
@ -110,11 +107,7 @@ public class LicensesManagerServiceTests extends XPackSingleNodeTestCase {
TestUtils.registerAndAckSignedLicenses(licenseService, tamperedLicense, LicensesStatus.INVALID);
// ensure that the invalid license never made it to cluster state
ClusterState state = clusterService.state();
assertNotNull(state);
assertNotNull(state.metaData());
assertNotNull(state.metaData().custom(LicensesMetaData.TYPE));
LicensesMetaData licensesMetaData = state.metaData().custom(LicensesMetaData.TYPE);
LicensesMetaData licensesMetaData = clusterService.state().metaData().custom(LicensesMetaData.TYPE);
assertThat(licensesMetaData.getLicense(), not(equalTo(tamperedLicense)));
}