Package org.opennms.core.test.elastic
Class ElasticSearchRule
- java.lang.Object
-
- org.opennms.core.test.elastic.ElasticSearchRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class ElasticSearchRule extends java.lang.Object implements org.junit.rules.TestRule
A JUnit rule which starts an embedded elastic-search instance.
-
-
Constructor Summary
Constructors Constructor Description ElasticSearchRule()
ElasticSearchRule(ElasticSearchServerConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
java.lang.String
getUrl()
void
startServer()
void
stopServer()
-
-
-
Constructor Detail
-
ElasticSearchRule
public ElasticSearchRule()
-
ElasticSearchRule
public ElasticSearchRule(ElasticSearchServerConfig config)
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
startServer
public void startServer() throws java.lang.Exception
- Throws:
java.lang.Exception
-
stopServer
public void stopServer() throws java.io.IOException
- Throws:
java.io.IOException
-
getUrl
public java.lang.String getUrl()
-
-