-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Kotlin PrimaryConstructorArbitraryIntrospector generates concurre…
…ntly
- Loading branch information
Showing
5 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
plugins { | ||
id "org.jetbrains.kotlin.jvm" version "${KOTLIN_VERSION}" | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${KOTLIN_VERSION}") | ||
implementation("org.jetbrains.kotlin:kotlin-reflect:${KOTLIN_VERSION}") | ||
|
||
testImplementation(project(":fixture-monkey-kotlin")) | ||
} |
36 changes: 36 additions & 0 deletions
36
...sts/src/test/kotlin/com/navercorp/fixturemonkey/tests/concurrent/kotlin/ConcurrentTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.navercorp.fixturemonkey.tests.concurrent.kotlin | ||
|
||
import com.navercorp.fixturemonkey.FixtureMonkey | ||
import com.navercorp.fixturemonkey.kotlin.KotlinPlugin | ||
import com.navercorp.fixturemonkey.kotlin.giveMeOne | ||
import com.navercorp.fixturemonkey.tests.TestEnvironment | ||
import org.assertj.core.api.BDDAssertions.then | ||
import org.junit.jupiter.api.RepeatedTest | ||
|
||
class ConcurrentTest { | ||
@RepeatedTest(TestEnvironment.TEST_COUNT) | ||
fun test1() { | ||
val actual: KotlinObject = SUT.giveMeOne<KotlinObject>() | ||
then(actual).isNotNull() | ||
} | ||
|
||
@RepeatedTest(TestEnvironment.TEST_COUNT) | ||
fun test2() { | ||
val actual: KotlinObject = SUT.giveMeOne<KotlinObject>() | ||
then(actual).isNotNull() | ||
} | ||
|
||
@RepeatedTest(TestEnvironment.TEST_COUNT) | ||
fun test3() { | ||
val actual: KotlinObject = SUT.giveMeOne<KotlinObject>() | ||
then(actual).isNotNull() | ||
} | ||
|
||
data class KotlinObject(val value: String, val map: Map<String, String>) | ||
|
||
companion object { | ||
private val SUT = FixtureMonkey.builder() | ||
.plugin(KotlinPlugin()) | ||
.build() | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
fixture-monkey-tests/kotlin-concurrent-tests/src/test/resources/junit-platform.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
junit.jupiter.execution.parallel.enabled=true | ||
junit.jupiter.execution.parallel.mode.default=CONCURRENT | ||
junit.jupiter.execution.parallel.config.strategy=fixed | ||
junit.jupiter.execution.parallel.config.fixed.parallelism=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters