Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ install:

script:
- set -e
- mvn -q -DskipTests compile
- make test
- docker ps -a

notifications:
email: false
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ publish-maven: ## Publish artifacts to Maven Central
ADDITIONAL_MVN_TARGETS=deploy ADDITIONAL_MVN_ARGS=" " make build

test: ## Run tests for Java/JUnit compatibility
USE_SSL=1 SERVICES=serverless,kinesis,sns,sqs,cloudwatch mvn $(MVN_ARGS) -q test
USE_SSL=1 SERVICES=serverless,kinesis,sns,sqs,cloudwatch mvn $(MVN_ARGS) test

.PHONY: usage clean install test
6 changes: 4 additions & 2 deletions src/main/java/cloud/localstack/Localstack.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void startup(LocalstackDockerConfiguration dockerConfiguration) {
}

public void stop() {
if (this.localStackContainer != null) {
if (localStackContainer != null) {
localStackContainer.stop();
}
locked = false;
Expand Down Expand Up @@ -191,7 +191,9 @@ public String getEndpointEC2() {
return endpointForService(ServiceName.EC2);
}

public String getEndpointStepFunctions() { return endpointForService(ServiceName.STEPFUNCTIONS); }
public String getEndpointStepFunctions() {
return endpointForService(ServiceName.STEPFUNCTIONS);
}

public String endpointForService(String serviceName) {
if (serviceToPortMap == null) {
Expand Down
7 changes: 6 additions & 1 deletion src/test/java/cloud/localstack/SQSMessagingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public void testSendMessage() throws JMSException {
MessageConsumer consumer = session.createConsumer(queue);
TextMessage received = (TextMessage) consumer.receive();
Assert.assertNotNull(received);

// clean up
consumer.close();
producer.close();
connection.close();
}

@Test
Expand Down Expand Up @@ -169,4 +174,4 @@ public void testSendMultiByteCharactersMessage() throws JMSException {
final ReceiveMessageResult messageResult = clientSQS.receiveMessage(queueUrl);
Assert.assertNotNull(messageResult);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import com.amazonaws.services.sqs.model.SendMessageResult;
import org.assertj.core.api.Assertions;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;

Expand All @@ -58,7 +57,8 @@
*/
@RunWith(LocalstackOutsideDockerTestRunner.class)
@ExtendWith(LocalstackExtension.class)
@Ignore
@org.junit.Ignore
@org.junit.jupiter.api.Disabled
public class BasicFunctionalityTest {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ public void testSQS() throws Exception {
MessageConsumer consumer = session.createConsumer(queue);
TextMessage received = (TextMessage) consumer.receive();
Assertions.assertThat(received.getText()).isEqualTo("Hello World!");

// clean up
consumer.close();
producer.close();
connection.close();
}

@org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ public void testSQSRunning() throws Exception {
TextMessage received = (TextMessage) consumer.receive();

Assertions.assertThat(received.getText()).isEqualTo("Hello World!");

// clean up
consumer.close();
producer.close();
connection.close();
}

private SQSConnection createSQSConnection() throws Exception {
Expand Down