Skip to content

Commit

Permalink
Add test jar to deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z committed Feb 25, 2024
1 parent 9e2452a commit 5730e6e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 40 deletions.
87 changes: 50 additions & 37 deletions clients/hadoopfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,18 @@ To export to S3:
</testExcludes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.gkatzioura.maven.cloud</groupId>
<artifactId>s3-storage-wagon</artifactId>
Expand Down Expand Up @@ -283,7 +294,6 @@ To export to S3:
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand Down Expand Up @@ -329,57 +339,60 @@ To export to S3:
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.16.3</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>4.10.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.16.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>4.10.0</version>
<scope>test</scope>
</dependency>

<!--
<!--
https://stackoverflow.com/questions/35569092/java-lang-classnotfoundexception-com-fasterxml-jackson-annotation-jsonincludev
says to keep all of these on the same versions -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.12.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.12.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-junit-rule-no-dependencies</artifactId>
<version>5.14.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-core</artifactId>
<version>5.15.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<version>2.9.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5730e6e

Please sign in to comment.