Skip to content

Commit

Permalink
Add test jar to deployment (#7506)
Browse files Browse the repository at this point in the history
* Add test jar to deployment

* CR fixes
  • Loading branch information
N-o-Z authored Feb 26, 2024
1 parent 35f2cf5 commit c378010
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 41 deletions.
93 changes: 55 additions & 38 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 All @@ -309,7 +319,11 @@ To export to S3:
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency> <!-- needed for aws-java-sdk in tests(!) -->
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand All @@ -329,57 +343,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
5 changes: 3 additions & 2 deletions clients/hadoopfs/src/test/java/io/lakefs/FSTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@
/**
* Base for all LakeFSFilesystem tests. Helps set common components up but
* contains no tests of its own.
* The visibility of this class is public as it's being used by other libraries for testing purposes
*
* 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/
* <a href="https://eliasnogueira.com/base-test-class-testing-pattern-why-and-how-to-use/">...</a>
*/
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
3 changes: 2 additions & 1 deletion clients/hadoopfs/src/test/java/io/lakefs/S3FSTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
/**
* Base for all LakeFSFilesystem tests that need to access S3. It adds a
* MinIO container to FSTestBase, and configures to use it.
* The visibility of this class is public as it's being used by other libraries for testing purposes
*/
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 c378010

Please sign in to comment.