mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 21:18:31 +00:00
parent
1964ebc6f2
commit
b9d92bae5a
@ -5,11 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
package org.elasticsearch.license;
|
package org.elasticsearch.license;
|
||||||
|
|
||||||
import org.elasticsearch.license.core.ESLicenses;
|
|
||||||
import org.elasticsearch.license.manager.ESLicenseManager;
|
import org.elasticsearch.license.manager.ESLicenseManager;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -12,8 +12,7 @@ import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
|||||||
import org.elasticsearch.test.InternalTestCluster;
|
import org.elasticsearch.test.InternalTestCluster;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
||||||
import static org.elasticsearch.test.ElasticsearchIntegrationTest.*;
|
|
||||||
import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
|
import static org.elasticsearch.test.ElasticsearchIntegrationTest.Scope.SUITE;
|
||||||
|
|
||||||
@ClusterScope(scope = SUITE, numDataNodes = 10)
|
@ClusterScope(scope = SUITE, numDataNodes = 10)
|
||||||
|
@ -208,7 +208,8 @@ public class LicensesServiceTests extends ElasticsearchIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMultipleClientRegistration() {}
|
public void testMultipleClientRegistration() {
|
||||||
|
}
|
||||||
|
|
||||||
private class TestLicenseClientListener implements LicensesClientService.Listener {
|
private class TestLicenseClientListener implements LicensesClientService.Listener {
|
||||||
|
|
||||||
@ -290,7 +291,8 @@ public class LicensesServiceTests extends ElasticsearchIntegrationTest {
|
|||||||
latch1.await();
|
latch1.await();
|
||||||
|
|
||||||
logger.info("waiting for onEnabled");
|
logger.info("waiting for onEnabled");
|
||||||
while(!testLicenseClientListener.processed.get()) {}
|
while (!testLicenseClientListener.processed.get()) {
|
||||||
|
}
|
||||||
|
|
||||||
Set<String> enabledFeatures = licensesManagerService.enabledFeatures();
|
Set<String> enabledFeatures = licensesManagerService.enabledFeatures();
|
||||||
assertTrue(enabledFeatures.contains("shield"));
|
assertTrue(enabledFeatures.contains("shield"));
|
||||||
@ -315,7 +317,8 @@ public class LicensesServiceTests extends ElasticsearchIntegrationTest {
|
|||||||
assertFalse("feature should not be enabled: no licenses registered", managerService.enabledFeatures().contains("marvel"));
|
assertFalse("feature should not be enabled: no licenses registered", managerService.enabledFeatures().contains("marvel"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test @Ignore
|
@Test
|
||||||
|
@Ignore
|
||||||
public void testLicenseExpiry() throws Exception {
|
public void testLicenseExpiry() throws Exception {
|
||||||
//TODO, first figure out how to generate a license with a quick expiry in matter of seconds
|
//TODO, first figure out how to generate a license with a quick expiry in matter of seconds
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ package org.elasticsearch.license.plugin;
|
|||||||
|
|
||||||
import org.elasticsearch.common.collect.ImmutableSet;
|
import org.elasticsearch.common.collect.ImmutableSet;
|
||||||
import org.elasticsearch.common.component.LifecycleComponent;
|
import org.elasticsearch.common.component.LifecycleComponent;
|
||||||
import org.elasticsearch.common.inject.Module;
|
|
||||||
import org.elasticsearch.plugins.AbstractPlugin;
|
import org.elasticsearch.plugins.AbstractPlugin;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user