From 5730e6e612ef92f08a6f598ec937516ea97aec60 Mon Sep 17 00:00:00 2001 From: Nir Ozery Date: Wed, 21 Feb 2024 22:11:34 +0200 Subject: [PATCH] Add test jar to deployment --- clients/hadoopfs/pom.xml | 87 +++++++++++-------- .../src/test/java/io/lakefs/FSTestBase.java | 4 +- .../src/test/java/io/lakefs/S3FSTestBase.java | 2 +- 3 files changed, 53 insertions(+), 40 deletions(-) diff --git a/clients/hadoopfs/pom.xml b/clients/hadoopfs/pom.xml index 6b7afca754c..dba0e8a47eb 100644 --- a/clients/hadoopfs/pom.xml +++ b/clients/hadoopfs/pom.xml @@ -250,7 +250,18 @@ To export to S3: - + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + + test-jar + + + + com.gkatzioura.maven.cloud s3-storage-wagon @@ -283,7 +294,6 @@ To export to S3: commons-lang3 3.12.0 - org.apache.hadoop hadoop-common @@ -329,42 +339,41 @@ To export to S3: 2.0.0 test + + org.testcontainers + testcontainers + 1.16.3 + test + + + + com.squareup.okhttp3 + mockwebserver + 4.10.0 + test + - - org.testcontainers - testcontainers - 1.16.0 - test - - - - com.squareup.okhttp3 - mockwebserver - 4.10.0 - test - - - - - com.fasterxml.jackson.core - jackson-databind - 2.13.4.2 - test - - - com.fasterxml.jackson.core - jackson-core - 2.12.3 - test - - - com.fasterxml.jackson.core - jackson-annotations - 2.12.3 - test - + + com.fasterxml.jackson.core + jackson-databind + 2.13.4.2 + test + + + com.fasterxml.jackson.core + jackson-core + 2.12.3 + test + + + com.fasterxml.jackson.core + jackson-annotations + 2.12.3 + test + org.mock-server @@ -372,14 +381,18 @@ To export to S3: 5.14.0 test - + + org.mock-server + mockserver-core + 5.15.0 + test + org.immutables value 2.9.3 test - com.google.guava guava diff --git a/clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java b/clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java index af1cc801ff8..c5f7c0c6780 100644 --- a/clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java +++ b/clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java @@ -60,7 +60,7 @@ * See e.g. "Base Test Class Testing Pattern: Why and How to use", * https://eliasnogueira.com/base-test-class-testing-pattern-why-and-how-to-use/ */ -abstract class FSTestBase { +public abstract class FSTestBase { static protected final Long UNUSED_FILE_SIZE = 1L; static protected final Long UNUSED_MTIME = 0L; static protected final String UNUSED_CHECKSUM = "unused"; @@ -147,7 +147,7 @@ public void hadoopSetup() throws IOException, URISyntaxException { mockServerClient.when(request() .withMethod("GET") .withPath("/config/storage"), - Times.once()) + Times.unlimited()) .respond(response() .withStatusCode(200) .withBody(gson.toJson(new StorageConfig() diff --git a/clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java b/clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java index 49da8a190a8..cef1a10cf2e 100644 --- a/clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java +++ b/clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java @@ -33,7 +33,7 @@ * Base for all LakeFSFilesystem tests that need to access S3. It adds a * MinIO container to FSTestBase, and configures to use it. */ -abstract class S3FSTestBase extends FSTestBase { +public abstract class S3FSTestBase extends FSTestBase { static private final Logger LOG = LoggerFactory.getLogger(S3FSTestBase.class); protected String s3Endpoint;