Skip to content

Commit 347ec4e

Browse files
committed
fixed test outOfMemoryException
1 parent 6dbac90 commit 347ec4e

File tree

3 files changed

+39
-37
lines changed

3 files changed

+39
-37
lines changed

build.gradle.kts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dependencies {
6262
testImplementation("io.kotest:kotest-assertions-core-jvm:$kotestVersion")
6363
}
6464

65-
java { modularity.inferModulePath.set(true) }
65+
//java { modularity.inferModulePath.set(true) }
6666

6767
tasks {
6868
dokkaHtml {
@@ -83,11 +83,14 @@ tasks {
8383
sourceCompatibility = "11"
8484
}
8585

86-
compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
87-
options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
88-
}
86+
// compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
87+
// options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
88+
// }
8989

90-
withType<Test> { useJUnitPlatform() }
90+
withType<Test> {
91+
useJUnitPlatform()
92+
maxHeapSize = "1g" // set heap size for the test JVM(s)
93+
}
9194
}
9295

9396
val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {

src/main/java/module-info.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
module com.github.kotlin_graphics.assimp {
2-
3-
requires kotlin.stdlib;
4-
5-
requires java.xml;
6-
7-
requires com.github.kotlin_graphics.uno_core;
8-
requires com.github.kotlin_graphics.gli;
9-
requires com.github.kotlin_graphics.glm;
10-
requires com.github.kotlin_graphics.kotlin_unsigned;
11-
requires com.github.kotlin_graphics.kool;
12-
13-
requires kotlin.logging.jvm;
14-
15-
exports assimp;
16-
exports assimp.format;
17-
exports assimp.format.assbin;
18-
exports assimp.format.assxml;
19-
exports assimp.format.blender;
20-
exports assimp.format.collada;
21-
exports assimp.format.fbx;
22-
exports assimp.format.md2;
23-
exports assimp.format.md3;
24-
exports assimp.format.md5;
25-
exports assimp.format.obj;
26-
exports assimp.format.ply;
27-
exports assimp.format.stl;
28-
exports assimp.format.X;
29-
exports assimp.postProcess;
30-
}
1+
//module com.github.kotlin_graphics.assimp {
2+
//
3+
// requires kotlin.stdlib;
4+
//
5+
// requires java.xml;
6+
//
7+
// requires com.github.kotlin_graphics.uno_core;
8+
// requires com.github.kotlin_graphics.gli;
9+
// requires com.github.kotlin_graphics.glm;
10+
// requires com.github.kotlin_graphics.kotlin_unsigned;
11+
// requires com.github.kotlin_graphics.kool;
12+
//
13+
// requires kotlin.logging.jvm;
14+
//
15+
// exports assimp;
16+
// exports assimp.format;
17+
// exports assimp.format.assbin;
18+
// exports assimp.format.assxml;
19+
// exports assimp.format.blender;
20+
// exports assimp.format.collada;
21+
// exports assimp.format.fbx;
22+
// exports assimp.format.md2;
23+
// exports assimp.format.md3;
24+
// exports assimp.format.md5;
25+
// exports assimp.format.obj;
26+
// exports assimp.format.ply;
27+
// exports assimp.format.stl;
28+
// exports assimp.format.X;
29+
// exports assimp.postProcess;
30+
//}

src/test/kotlin/assimp/obj/obj.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class obj : StringSpec() {
1111
"box"{ box("$path/box.obj") }
1212
"cube"{ cube("$path/cube.obj") }
1313
"nanosuit" { nanosuit("$path/nanosuit") }
14-
// fires "java.lang.OutOfMemoryError: Java heap space" if run together with the others
15-
// "wall"{ wall("$path/wall.obj") }
14+
"wall"{ wall("$path/wall.obj") }
1615
"spider"{ spider.obj("$path/spider") }
1716
"shelter" { shelter("$path/shelter") }
1817
"car" { car("$path/car") }

0 commit comments

Comments
 (0)