Skip to content

Commit

Permalink
Merge pull request #54 from moqui/java11
Browse files Browse the repository at this point in the history
Update build.gradle and PopCommerceSuite.groovy for JUnit Platform
  • Loading branch information
jonesde authored Apr 25, 2022
2 parents cf91abf + 2d30e03 commit ddfb956
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 ddfb956

Please sign in to comment.