-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#8965] Apply SharedTestLifeCycle to RabbitMq
- Loading branch information
Showing
14 changed files
with
62 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...it/rabbitmq-it/src/test/java/com/navercorp/pinpoint/plugin/rabbitmq/TestBrokerServer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.navercorp.pinpoint.plugin.rabbitmq; | ||
|
||
import com.navercorp.pinpoint.plugin.rabbitmq.util.TestBroker; | ||
import com.navercorp.pinpoint.test.plugin.shared.SharedTestLifeCycle; | ||
|
||
import java.util.Properties; | ||
|
||
public class TestBrokerServer implements SharedTestLifeCycle { | ||
private TestBroker broker = new TestBroker(); | ||
@Override | ||
public Properties beforeAll() { | ||
this.broker = new TestBroker(); | ||
try { | ||
broker.start(); | ||
} catch (Exception e) { | ||
throw new RuntimeException("broker start error", e); | ||
} | ||
return new Properties(); | ||
} | ||
|
||
@Override | ||
public void afterAll() { | ||
if (broker != null) { | ||
broker.shutdown(); | ||
} | ||
} | ||
} |
19 changes: 6 additions & 13 deletions
19
...t/src/test/java/com/navercorp/pinpoint/plugin/rabbitmq/spring/SpringAmqpRabbitITBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
package com.navercorp.pinpoint.plugin.rabbitmq.spring; | ||
|
||
import com.navercorp.pinpoint.plugin.rabbitmq.util.TestBroker; | ||
import com.navercorp.pinpoint.test.plugin.shared.AfterSharedClass; | ||
import com.navercorp.pinpoint.test.plugin.shared.BeforeSharedClass; | ||
import com.navercorp.pinpoint.test.plugin.shared.SharedTestBeforeAllResult; | ||
|
||
import java.util.Properties; | ||
|
||
/** | ||
* @author kootaejin | ||
*/ | ||
public class SpringAmqpRabbitITBase { | ||
|
||
private static final TestBroker BROKER = new TestBroker(); | ||
|
||
@BeforeSharedClass | ||
public static void sharedSetUp() throws Exception { | ||
BROKER.start(); | ||
} | ||
|
||
@AfterSharedClass | ||
public static void sharedTearDown() { | ||
BROKER.shutdown(); | ||
@SharedTestBeforeAllResult | ||
public static void setBeforeAllResult(Properties beforeAllResult) { | ||
// empty | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters