Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,70 @@ jobs:
name: logs.tgz
path: ./logs.tgz

testSsl:
timeout-minutes: 5
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
scala-version:
- 2.11
- 2.12
spark-version:
- 2.4
- 3.1
topology:
- single
java-version:
- 8
- 11
docker-img:
- docker.io/arangodb/arangodb:3.8.3
exclude:
- scala-version: 2.11
spark-version: 3.1
- scala-version: 2.11
java-version: 11
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
java-version: ${{matrix.java-version}}
distribution: 'adopt'
- name: Start Database
run: ./docker/start_db.sh
env:
SSL: true
STARTER_MODE: ${{matrix.topology}}
DOCKER_IMAGE: ${{matrix.docker-img}}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Info
run: mvn -version
- name: Test
run: mvn -e --no-transfer-progress -f ./integration-tests/pom.xml -Pscala-${{matrix.scala-version}} -Pspark-${{matrix.spark-version}} -Dtest=org.apache.spark.sql.arangodb.datasource.SslTest -DSslTest=true test
- name: Collect docker logs on failure
if: ${{ cancelled() || failure() }}
uses: jwalton/gh-docker-logs@v1
with:
dest: './logs'
- name: Tar logs
if: ${{ cancelled() || failure() }}
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: ${{ cancelled() || failure() }}
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz

test-older-spark-versions:
timeout-minutes: 5
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import com.fasterxml.jackson.databind.{JsonSerializer, ObjectMapper, SerializerP
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType}
import org.apache.spark.sql.{DataFrame, SparkSession}
import org.junit.jupiter.api.{AfterEach, BeforeEach, Disabled, Test}
import org.junit.jupiter.api.condition.EnabledIfSystemProperty
import org.junit.jupiter.api.{AfterEach, BeforeEach, Test}

import java.io.ByteArrayInputStream
import java.security.KeyStore
Expand All @@ -19,7 +20,7 @@ import java.time.LocalDate
import java.util.Base64
import javax.net.ssl.{SSLContext, TrustManagerFactory}

@Disabled("manual test only")
@EnabledIfSystemProperty(named = "SslTest", matches = "true")
class SslTest {
private val arangoDB: ArangoDB = SslTest.arangoDB
private val db: ArangoDatabase = SslTest.db
Expand Down Expand Up @@ -101,6 +102,7 @@ object SslTest {
.password(password)
.host(singleEndpoint.split(':').head, singleEndpoint.split(':')(1).toInt)
.serializer(new ArangoJack() {
//noinspection ConvertExpressionToSAM
configure(new ArangoJack.ConfigureFunction {
override def configure(mapper: ObjectMapper): Unit = mapper
.registerModule(DefaultScalaModule)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.1</version>
<version>5.8.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down