diff --git a/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceIT.java b/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java similarity index 96% rename from watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceIT.java rename to watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java index 37b02ae8079..aa9344b4a21 100644 --- a/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceIT.java +++ b/watcher/src/test/java/org/elasticsearch/watcher/actions/hipchat/service/HipChatServiceTests.java @@ -11,7 +11,6 @@ import org.elasticsearch.test.junit.annotations.Network; import org.elasticsearch.watcher.actions.hipchat.HipChatAction; import org.elasticsearch.watcher.test.AbstractWatcherIntegrationTests; import org.elasticsearch.watcher.transport.actions.put.PutWatchResponse; -import org.junit.Before; import org.junit.Test; import static org.elasticsearch.index.query.QueryBuilders.boolQuery; @@ -29,9 +28,7 @@ import static org.hamcrest.Matchers.*; * */ @Network -public class HipChatServiceIT extends AbstractWatcherIntegrationTests { - - private HipChatService service; +public class HipChatServiceTests extends AbstractWatcherIntegrationTests { @Override protected boolean timeWarped() { @@ -63,13 +60,9 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests { .build(); } - @Before - public void init() throws Exception { - service = getInstanceFromMaster(HipChatService.class); - } - @Test public void testSendMessage_V1Account() throws Exception { + HipChatService service = getInstanceFromMaster(HipChatService.class); HipChatMessage hipChatMessage = new HipChatMessage( "/code HipChatServiceIT#testSendMessage_V1Account", new String[] { "test-watcher", "test-watcher-2" }, @@ -93,6 +86,7 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests { @Test public void testSendMessage_IntegrationAccount() throws Exception { + HipChatService service = getInstanceFromMaster(HipChatService.class); HipChatMessage hipChatMessage = new HipChatMessage( "/code HipChatServiceIT#testSendMessage_IntegrationAccount", null, // custom rooms are unsupported by integration profiles @@ -116,6 +110,7 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests { @Test public void testSendMessage_UserAccount() throws Exception { + HipChatService service = getInstanceFromMaster(HipChatService.class); HipChatMessage hipChatMessage = new HipChatMessage( "/code HipChatServiceIT#testSendMessage_UserAccount", new String[] { "test-watcher", "test-watcher-2" }, @@ -140,7 +135,6 @@ public class HipChatServiceIT extends AbstractWatcherIntegrationTests { @Test public void testWatchWithHipChatAction() throws Exception { - HipChatAccount.Profile profile = randomFrom(HipChatAccount.Profile.values()); String account; HipChatAction.Builder actionBuilder;