Skip to content

project.mongo.port is always 27017 #62

@floogulinc

Description

@floogulinc

When using a set port or random one, project.mongo.port is always 27017.

This is the build.gradle I'm using:

plugins {
    id 'java'
    id 'application'
    id 'com.sourcemuse.mongo' version '1.0.7'
}
repositories {
    jcenter()
}
dependencies {
    implementation 'com.google.guava:guava:28.0-jre'
    implementation 'com.sparkjava:spark-core:2.9.1'
    implementation 'org.slf4j:slf4j-simple:1.7.26'
    implementation 'org.mongodb:mongodb-driver-sync:3.11.1'
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
}
application {
    mainClassName = 'umm3601.Server'
}
test {
    useJUnitPlatform()

    runWithMongoDb = true

    mongo {
      port 'random'
      mongoVersion '3.4.23' // should match lab version
    }

    systemProperty "test.mongo.port", project.mongo.port
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions