Skip to content

Commit

Permalink
Update build.gradle and PopCommerceSuite.groovy for JUnit Platform, n…
Browse files Browse the repository at this point in the history
…ow works with java11 branch of moqui-framework
  • Loading branch information
jonesde committed Apr 6, 2022
1 parent cf91abf commit 2d30e03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Expand Up @@ -37,6 +37,11 @@ dependencies {
check.dependsOn.clear()

test {
useJUnitPlatform()
testLogging { events "passed", "skipped", "failed" }
testLogging.showStandardStreams = true; testLogging.showExceptions = true
maxParallelForks 1

dependsOn cleanTest
dependsOn ':runtime:component:mantle-usl:test'
include '**/PopCommerceSuite.class'
Expand All @@ -46,9 +51,6 @@ test {
systemProperty 'moqui.init.static', 'true'
maxHeapSize = "512M"

// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true; testLogging.showExceptions = true;

classpath += files(sourceSets.main.output.classesDirs)
// filter out classpath entries that don't exist (gradle adds a bunch of these), or ElasticSearch JarHell will blow up
classpath = classpath.filter { it.exists() }
Expand Down
14 changes: 7 additions & 7 deletions src/test/groovy/PopCommerceSuite.groovy
Expand Up @@ -13,16 +13,16 @@
*/


import org.junit.AfterClass
import org.junit.runner.RunWith
import org.junit.runners.Suite
import org.junit.jupiter.api.AfterAll
import org.junit.platform.suite.api.SelectClasses
import org.junit.platform.suite.api.Suite
import org.moqui.Moqui

@RunWith(Suite.class)
@Suite.SuiteClasses([ PopcAdminScreenTests.class, PopCommerceScreenTests.class ])
@Suite
@SelectClasses([ PopcAdminScreenTests.class, PopCommerceScreenTests.class ])
class PopCommerceSuite {
@AfterClass
public static void destroyMoqui() {
@AfterAll
static void destroyMoqui() {
Moqui.destroyActiveExecutionContextFactory();
}
}

0 comments on commit 2d30e03

Please sign in to comment.