Skip to content

Commit

Permalink
Fix integration test. (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibd authored Sep 7, 2023
1 parent e32946f commit 57e0b95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<junit.version>4.13.1</junit.version>
<mockito.version>2.22.0</mockito.version>
<powermock.version>2.0.0-beta.5</powermock.version>
<testcontainers.version>1.15.2</testcontainers.version>
<testcontainers.version>1.19.0</testcontainers.version>
<awaitility.version>4.2.0</awaitility.version>

<!-- build plugin dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.Container;
import org.testcontainers.containers.Network;
import org.testcontainers.shaded.com.fasterxml.jackson.databind.ObjectMapper;
import org.testcontainers.shaded.com.fasterxml.jackson.databind.node.ObjectNode;


/**
Expand Down Expand Up @@ -109,15 +107,9 @@ private void test(String sourceConfigYaml) throws Exception {
waitForConnectorRunning(standaloneContainer, true, "amqp1_0-source");
log.info("amqp1_0 source is running");

ObjectMapper objectMapper = new ObjectMapper();
ObjectNode objectNode = objectMapper.createObjectNode();
objectNode.put("user-op-queue-topic", "org.apache.pulsar.client.impl.schema.ByteBufferSchema");

execResult = standaloneContainer.execInContainer(
"/pulsar/bin/pulsar-admin",
"sinks", "create",
"--custom-schema-inputs",
objectNode.toString(),
"--sink-config-file",
"/pulsar/amqp1_0-sink-config.yaml"
);
Expand All @@ -136,6 +128,10 @@ private void test(String sourceConfigYaml) throws Exception {
.atMost(30, TimeUnit.SECONDS)
.until(testSuccess::get);
log.info("Finish the integration test.");

network.close();
standaloneContainer.close();
solaceContainer.close();
}

private void generateData(int count, String remoteUri) {
Expand Down

0 comments on commit 57e0b95

Please sign in to comment.