Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for AWS SQS tests when running against actual AWS #1160

Merged
merged 2 commits into from
Apr 28, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public CamelAWSSQSPropertyFactory withQueueNameOrArn(String queueNameOrArn) {
return setProperty("camel.sink.path.queueNameOrArn", queueNameOrArn);
}

public CamelAWSSQSPropertyFactory withAutoCreateQueue(boolean value) {
return setProperty("camel.sink.endpoint.autoCreateQueue", value);
}

public static CamelAWSSQSPropertyFactory basic() {
return new CamelAWSSQSPropertyFactory()
.withName("CamelAws2sqsSinkConnector")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public void testBasicSendReceive() {
.withName("CamelAwssqsSinkConnectorSpringBootStyle")
.withTopics(topicName)
.withAmazonConfig(amazonProperties)
.withAutoCreateQueue(true)
.withQueueNameOrArn(queueName);

runTest(testProperties, topicName, expect);
Expand All @@ -144,7 +145,8 @@ public void testBasicSendReceive() {
}
}

@DisabledIfSystemProperty(named = "aws-service.instance.type", matches = "remote")
@DisabledIfSystemProperty(named = "aws-service.instance.type", matches = "remote",
disabledReason = "Runs repeatedly, so it's disabled to avoid abusing the free tier")
@Timeout(value = 120)
@RepeatedTest(3)
public void testBasicSendReceiveUsingKafkaStyle() {
Expand All @@ -157,6 +159,7 @@ public void testBasicSendReceiveUsingKafkaStyle() {
.withName("CamelAwssqsSinkConnectorKafkaStyle")
.withTopics(topicName)
.withAmazonConfig(amazonProperties, CamelAWSSQSPropertyFactory.KAFKA_STYLE)
.withAutoCreateQueue(true)
.withQueueNameOrArn(queueName);

runTest(testProperties, topicName, expect);
Expand All @@ -167,7 +170,8 @@ public void testBasicSendReceiveUsingKafkaStyle() {
}
}

@DisabledIfSystemProperty(named = "aws-service.instance.type", matches = "remote")
@DisabledIfSystemProperty(named = "aws-service.instance.type", matches = "remote",
disabledReason = "Uses arguments that may require additional setup on AWS or are not available in remote mode")
@Timeout(value = 120)
@RepeatedTest(3)
public void testBasicSendReceiveUsingUrl() {
Expand Down