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

Workaround #2207 in Azure Storage Data Lake test #2322

Merged
merged 2 commits into from
Mar 18, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@

<dependencyManagement>
<dependencies>
<dependency><!-- Workaround for https://github.com/apache/camel-quarkus/issues/2207 -->
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.11.3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-bom-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.camel.quarkus.test.support.azure.AzureStorageTestResource;
import org.apache.commons.lang3.RandomStringUtils;
import org.hamcrest.Matchers;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;

Expand All @@ -32,18 +33,18 @@
@QuarkusTestResource(AzureStorageTestResource.class)
class AzureStorageDatalakeTest {

private static final Logger LOG = Logger.getLogger(AzureStorageDatalakeTest.class);

@Test
public void crud() {
final String filesystem = "cqfs" + RandomStringUtils.randomNumeric(16);
final String filename = "file" + RandomStringUtils.randomNumeric(16);

/* The filesystem does not exist initially */
// TODO this causes an infinite loop of requests see
// https://github.com/apache/camel-quarkus/issues/2304
// RestAssured.get("/azure-storage-datalake/filesystems")
// .then()
// .statusCode(200)
// .body(Matchers.not(Matchers.hasItem(filesystem)));
RestAssured.get("/azure-storage-datalake/filesystem/" + filesystem)
.then()
.statusCode(200)
.body("", Matchers.not(Matchers.hasItem(filesystem)));

try {
/* Create the filesystem */
Expand All @@ -53,12 +54,10 @@ public void crud() {
.statusCode(201);

/* Now it should exist */
// TODO this causes an infinite loop of requests see
// https://github.com/apache/camel-quarkus/issues/2304
// RestAssured.get("/azure-storage-datalake/filesystem/" + filesystem)
// .then()
// .statusCode(200)
// .body(Matchers.hasItem(filesystem));
RestAssured.get("/azure-storage-datalake/filesystem/" + filesystem)
.then()
.statusCode(200)
.body("", Matchers.hasItem(filesystem));

/* No paths yet */
RestAssured.get("/azure-storage-datalake/filesystem/" + filesystem + "/paths")
Expand Down Expand Up @@ -99,10 +98,14 @@ public void crud() {
} finally {
/* Clean up */

RestAssured.given()
.delete("/azure-storage-datalake/filesystem/" + filesystem + "/path/" + filename)
.then()
.statusCode(204);
try {
RestAssured.given()
.delete("/azure-storage-datalake/filesystem/" + filesystem + "/path/" + filename)
.then()
.statusCode(204);
} catch (Exception e) {
LOG.warnf(e, "Could not delete file '%s' in file system %s", filename, filesystem);
}

RestAssured.given()
.delete("/azure-storage-datalake/filesystem/" + filesystem)
Expand Down
2 changes: 0 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@
<quarkus-hazelcast-client.version>1.1.1</quarkus-hazelcast-client.version>
<quarkus-qpid-jms.version>0.23.0</quarkus-qpid-jms.version>
<protobuf.version>${protobuf-version}</protobuf.version>
<reactor-core.version>3.3.13.RELEASE</reactor-core.version>
<reactor-netty.version>0.9.16.RELEASE</reactor-netty.version><!-- A newer micro than the one in azure-sdk-bom required by camel-quarkus-azure-eventhubs -->
<retrofit.version>2.5.0</retrofit.version>
<scala-2.11.version>2.11.12</scala-2.11.version><!-- Spark -->
<smallrye.reactive.messaging.camel.version>2.8.0</smallrye.reactive.messaging.camel.version> <!-- keep in sync with Quarkus SmallRye Reactive Messaging -->
Expand Down
10 changes: 0 additions & 10 deletions poms/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5840,16 +5840,6 @@
<artifactId>debezium-embedded</artifactId>
<version>${debezium.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor-core.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty</artifactId>
<version>${reactor-netty.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.freemarker</groupId>
<artifactId>quarkus-freemarker</artifactId>
Expand Down