File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
main/java/cloud/localstack
test/java/cloud/localstack/awssdkv1/docker Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ public void startup(LocalstackDockerConfiguration dockerConfiguration) {
108108 public void stop () {
109109 if (localStackContainer != null ) {
110110 localStackContainer .stop ();
111+ localStackContainer = null ;
111112 }
112113 locked = false ;
113114 }
Original file line number Diff line number Diff line change 1212import org .junit .rules .ExpectedException ;
1313
1414import static org .junit .Assert .assertNotNull ;
15+ import static org .junit .Assert .assertFalse ;
1516
1617public class LocalstackDockerTest {
1718
@@ -52,6 +53,13 @@ public void stop() {
5253 amazonSQS .createQueue ("test-queue" ).getQueueUrl ();
5354 }
5455
56+ @ Test
57+ public void restart () {
58+ Localstack .INSTANCE .startup (DOCKER_CONFIG );
59+ Localstack .INSTANCE .stop ();
60+ assertFalse (Localstack .INSTANCE .isRunning ());
61+ }
62+
5563 @ After
5664 public void tearDown () {
5765 Localstack .INSTANCE .stop ();
You can’t perform that action at this time.
0 commit comments