Skip to content
Closed
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
24 changes: 24 additions & 0 deletions .evergreen/.evg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,16 @@ functions:
${PREPARE_SHELL}
SCALA="${SCALA}" AUTH="${AUTH}" SSL="${SSL}" MONGODB_URI="${MONGODB_URI}" SAFE_FOR_MULTI_MONGOS="${SAFE_FOR_MULTI_MONGOS}" TOPOLOGY="${TOPOLOGY}" JAVA_VERSION="${JAVA_VERSION}" .evergreen/run-scala-tests.sh

"run kotlin tests":
- command: shell.exec
type: test
params:
working_dir: "src"
script: |
${PREPARE_SHELL}
AUTH="${AUTH}" SSL="${SSL}" MONGODB_URI="${MONGODB_URI}" SAFE_FOR_MULTI_MONGOS="${SAFE_FOR_MULTI_MONGOS}" TOPOLOGY="${TOPOLOGY}" JAVA_VERSION="${JAVA_VERSION}" .evergreen/run-kotlin-tests.sh


"run socket tests":
- command: shell.exec
type: test
Expand Down Expand Up @@ -904,6 +914,11 @@ tasks:
- func: "bootstrap mongo-orchestration"
- func: "run scala tests"

- name: "kotlin-tests"
commands:
- func: "bootstrap mongo-orchestration"
- func: "run kotlin tests"

- name: "reactive-streams-tck-test"
commands:
- func: "bootstrap mongo-orchestration"
Expand Down Expand Up @@ -1437,6 +1452,8 @@ tasks:
name: "plain-auth-test"
- variant: ".test-scala-variant"
name: "scala-tests"
- variant: ".test-kotlin-variant"
name: "kotlin-tests"
- variant: ".tests-netty-variant"
name: "netty-test"
commands:
Expand Down Expand Up @@ -2052,6 +2069,13 @@ buildvariants:
tasks:
- name: "scala-tests"

- matrix_name: "kotlin-tests"
matrix_spec: { auth: "noauth", ssl: "nossl", jdk: ["jdk8", "jdk17"], version: ["6.0"], topology: "replicaset", os: "ubuntu" }
display_name: "Kotlin: ${jdk} ${version} ${topology} ${os}"
tags: ["test-kotlin-variant"]
tasks:
- name: "kotlin-tests"

- name: publish-snapshot
display_name: "Publish Snapshot"
run_on: ubuntu1804-test
Expand Down
37 changes: 37 additions & 0 deletions .evergreen/run-kotlin-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

set -o xtrace # Write all commands first to stderr
set -o errexit # Exit the script with error if any of the commands fail


AUTH=${AUTH:-noauth}
SSL=${SSL:-nossl}
MONGODB_URI=${MONGODB_URI:-}
TOPOLOGY=${TOPOLOGY:-standalone}
SAFE_FOR_MULTI_MONGOS=${SAFE_FOR_MULTI_MONGOS:-}

############################################
# Main Program #
############################################
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")"
. "${RELATIVE_DIR_PATH}/javaConfig.bash"


if [ "$SSL" != "nossl" ]; then
echo -e "\nSSL support not configured for Kotlin tests"
exit 1
fi

if [ "$AUTH" != "noauth" ]; then
echo -e "\nAuth support not configured for Kotlin tests"
exit 1
fi

if [ "$SAFE_FOR_MULTI_MONGOS" == "true" ]; then
export MULTI_MONGOS_URI_SYSTEM_PROPERTY="-Dorg.mongodb.test.multi.mongos.uri=${MONGODB_URI}"
fi

echo "Running Kotlin tests"

./gradlew -version
./gradlew :driver-kotlin-sync:kCheck -Dorg.mongodb.test.uri=${MONGODB_URI} ${MULTI_MONGOS_URI_SYSTEM_PROPERTY}
15 changes: 15 additions & 0 deletions config/detekt/baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<SmellBaseline>
<ManuallySuppressedIssues/>
<CurrentIssues>
<ID>IteratorNotThrowingNoSuchElementException:MongoCursor.kt$MongoCursor&lt;T : Any> : IteratorCloseable</ID>
<ID>LargeClass:MongoCollectionTest.kt$MongoCollectionTest</ID>
<ID>LongMethod:FindIterableTest.kt$FindIterableTest$@Suppress("DEPRECATION") @Test fun shouldCallTheUnderlyingMethods()</ID>
<ID>MaxLineLength:MapReduceIterable.kt$MapReduceIterable$*</ID>
<ID>SwallowedException:MockitoHelper.kt$MockitoHelper.DeepReflectionEqMatcher$e: Throwable</ID>
<ID>TooManyFunctions:ClientSession.kt$ClientSession : jClientSession</ID>
<ID>TooManyFunctions:FindIterable.kt$FindIterable&lt;T : Any> : MongoIterable</ID>
<ID>TooManyFunctions:MongoCollection.kt$MongoCollection&lt;T : Any></ID>
<ID>TooManyFunctions:MongoDatabase.kt$MongoDatabase</ID>
</CurrentIssues>
</SmellBaseline>
Loading