Junit5: Cannot supply primitive array to a @ParameterizedTest

Created on 17 Jul 2017  路  8Comments  路  Source: junit-team/junit5

Overview

Bug report: OutOfMemoryError when running parameterized test

Sample code that will produce the error can be found here: https://github.com/braghome/primitive.array

[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=4, ConflictMarker.markTime=0, ConflictMarker.nodeCount=128, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=43, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=7, ConflictResolver.conflictItemCount=94, DefaultDependencyCollector.collectTime=78, DefaultDependencyCollector.transformTime=12}
[DEBUG] org.apache.maven.plugins:maven-surefire-plugin:jar:2.20:
[DEBUG]    org.junit.platform:junit-platform-surefire-provider:jar:1.0.0-M5:runtime
[DEBUG]       org.junit.platform:junit-platform-launcher:jar:1.0.0-M5:runtime
[DEBUG]       org.apache.maven.surefire:common-java5:jar:2.19.1:runtime
[DEBUG]    org.junit.jupiter:junit-jupiter-engine:jar:5.0.0-M5:runtime
[DEBUG]       org.junit.platform:junit-platform-engine:jar:1.0.0-M5:runtime
[DEBUG]          org.junit.platform:junit-platform-commons:jar:1.0.0-M5:runtime
[DEBUG]          org.opentest4j:opentest4j:jar:1.0.0-M2:runtime
[DEBUG]       org.junit.jupiter:junit-jupiter-api:jar:5.0.0-M5:runtime
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.2.1:compile
[DEBUG]    org.apache.maven.surefire:maven-surefire-common:jar:2.20:compile
[DEBUG]       org.apache.maven.surefire:surefire-booter:jar:2.20:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:2.2.1:compile
[DEBUG]          org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
[DEBUG]       org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile
[DEBUG]          org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]             junit:junit:jar:4.12:compile
[DEBUG]                org.hamcrest:hamcrest-core:jar:1.3:compile
[DEBUG]       org.apache.maven:maven-project:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-settings:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-profile:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[DEBUG]             backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[DEBUG]          org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[DEBUG]          org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
[DEBUG]       org.apache.maven:maven-model:jar:2.2.1:compile
[DEBUG]       org.apache.maven:maven-core:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:compile
[DEBUG]          org.slf4j:slf4j-jdk14:jar:1.5.6:runtime
[DEBUG]             org.slf4j:slf4j-api:jar:1.5.6:runtime
[DEBUG]          org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime
[DEBUG]          org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[DEBUG]          org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-error-diagnostics:jar:2.2.1:compile
[DEBUG]          org.apache.maven:maven-monitor:jar:2.2.1:compile
[DEBUG]          classworlds:classworlds:jar:1.1:compile
[DEBUG]          org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]             org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]       org.apache.commons:commons-lang3:jar:3.1:compile
[DEBUG]    org.apache.maven.surefire:surefire-api:jar:2.20:compile
[DEBUG]       org.apache.maven.surefire:surefire-logger-api:jar:2.20:compile
[DEBUG]    org.apache.maven:maven-toolchain:jar:2.2.1:compile
[DEBUG]    org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20
[DEBUG]   Included: org.apache.maven.plugins:maven-surefire-plugin:jar:2.20
[DEBUG]   Included: org.junit.platform:junit-platform-surefire-provider:jar:1.0.0-M5
[DEBUG]   Included: org.junit.platform:junit-platform-launcher:jar:1.0.0-M5
[DEBUG]   Included: org.apache.maven.surefire:common-java5:jar:2.19.1
[DEBUG]   Included: org.junit.jupiter:junit-jupiter-engine:jar:5.0.0-M5
[DEBUG]   Included: org.junit.platform:junit-platform-engine:jar:1.0.0-M5
[DEBUG]   Included: org.junit.platform:junit-platform-commons:jar:1.0.0-M5
[DEBUG]   Included: org.opentest4j:opentest4j:jar:1.0.0-M2
[DEBUG]   Included: org.junit.jupiter:junit-jupiter-api:jar:5.0.0-M5
[DEBUG]   Included: org.apache.maven.surefire:maven-surefire-common:jar:2.20
[DEBUG]   Included: org.apache.maven.surefire:surefire-booter:jar:2.20
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.5.15
[DEBUG]   Included: junit:junit:jar:4.12
[DEBUG]   Included: org.hamcrest:hamcrest-core:jar:1.3
[DEBUG]   Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.11
[DEBUG]   Included: org.slf4j:slf4j-jdk14:jar:1.5.6
[DEBUG]   Included: org.slf4j:jcl-over-slf4j:jar:1.5.6
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:3.0
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.apache.commons:commons-lang3:jar:3.1
[DEBUG]   Included: org.apache.maven.surefire:surefire-api:jar:2.20
[DEBUG]   Included: org.apache.maven.surefire:surefire-logger-api:jar:2.20
[DEBUG]   Included: org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-surefire-plugin:2.20:test from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20, parent: sun.misc.Launcher$AppClassLoader@42a57993]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.20:test' with basic configurator -->
[DEBUG]   (s) additionalClasspathElements = []
[DEBUG]   (s) basedir = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array
[DEBUG]   (s) childDelegation = false
[DEBUG]   (s) classesDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/classes
[DEBUG]   (s) classpathDependencyExcludes = []
[DEBUG]   (s) dependenciesToScan = []
[DEBUG]   (s) disableXmlReport = false
[DEBUG]   (s) enableAssertions = true
[DEBUG]   (f) forkCount = 1
[DEBUG]   (s) forkMode = once
[DEBUG]   (s) forkedProcessExitTimeoutInSeconds = 30
[DEBUG]   (s) junitArtifactName = junit:junit
[DEBUG]   (s) localRepository =       id: local
      url: file:///Users/manavdeepbrar/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

[DEBUG]   (f) parallelMavenExecution = false
[DEBUG]   (s) parallelOptimized = true
[DEBUG]   (s) perCoreThreadCount = true
[DEBUG]   (s) pluginArtifactMap = {org.apache.maven.plugins:maven-surefire-plugin=org.apache.maven.plugins:maven-surefire-plugin:maven-plugin:2.20:, org.junit.platform:junit-platform-surefire-provider=org.junit.platform:junit-platform-surefire-provider:jar:1.0.0-M5:runtime, org.junit.platform:junit-platform-launcher=org.junit.platform:junit-platform-launcher:jar:1.0.0-M5:runtime, org.apache.maven.surefire:common-java5=org.apache.maven.surefire:common-java5:jar:2.19.1:runtime, org.junit.jupiter:junit-jupiter-engine=org.junit.jupiter:junit-jupiter-engine:jar:5.0.0-M5:runtime, org.junit.platform:junit-platform-engine=org.junit.platform:junit-platform-engine:jar:1.0.0-M5:runtime, org.junit.platform:junit-platform-commons=org.junit.platform:junit-platform-commons:jar:1.0.0-M5:runtime, org.opentest4j:opentest4j=org.opentest4j:opentest4j:jar:1.0.0-M2:runtime, org.junit.jupiter:junit-jupiter-api=org.junit.jupiter:junit-jupiter-api:jar:5.0.0-M5:runtime, org.apache.maven:maven-plugin-api=org.apache.maven:maven-plugin-api:jar:2.2.1:compile, org.apache.maven.surefire:maven-surefire-common=org.apache.maven.surefire:maven-surefire-common:jar:2.20:compile, org.apache.maven.surefire:surefire-booter=org.apache.maven.surefire:surefire-booter:jar:2.20:compile, org.apache.maven:maven-artifact=org.apache.maven:maven-artifact:jar:2.2.1:compile, org.codehaus.plexus:plexus-utils=org.codehaus.plexus:plexus-utils:jar:1.5.15:compile, org.apache.maven:maven-plugin-descriptor=org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile, org.codehaus.plexus:plexus-container-default=org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile, junit:junit=junit:junit:jar:4.12:compile, org.hamcrest:hamcrest-core=org.hamcrest:hamcrest-core:jar:1.3:compile, org.apache.maven:maven-project=org.apache.maven:maven-project:jar:2.2.1:compile, org.apache.maven:maven-settings=org.apache.maven:maven-settings:jar:2.2.1:compile, org.apache.maven:maven-profile=org.apache.maven:maven-profile:jar:2.2.1:compile, org.apache.maven:maven-artifact-manager=org.apache.maven:maven-artifact-manager:jar:2.2.1:compile, backport-util-concurrent:backport-util-concurrent=backport-util-concurrent:backport-util-concurrent:jar:3.1:compile, org.apache.maven:maven-plugin-registry=org.apache.maven:maven-plugin-registry:jar:2.2.1:compile, org.codehaus.plexus:plexus-interpolation=org.codehaus.plexus:plexus-interpolation:jar:1.11:compile, org.apache.maven:maven-model=org.apache.maven:maven-model:jar:2.2.1:compile, org.apache.maven:maven-core=org.apache.maven:maven-core:jar:2.2.1:compile, org.apache.maven:maven-plugin-parameter-documenter=org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:compile, org.slf4j:slf4j-jdk14=org.slf4j:slf4j-jdk14:jar:1.5.6:runtime, org.slf4j:slf4j-api=org.slf4j:slf4j-api:jar:1.5.6:runtime, org.slf4j:jcl-over-slf4j=org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime, org.apache.maven.reporting:maven-reporting-api=org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile, org.apache.maven:maven-repository-metadata=org.apache.maven:maven-repository-metadata:jar:2.2.1:compile, org.apache.maven:maven-error-diagnostics=org.apache.maven:maven-error-diagnostics:jar:2.2.1:compile, org.apache.maven:maven-monitor=org.apache.maven:maven-monitor:jar:2.2.1:compile, classworlds:classworlds=classworlds:classworlds:jar:1.1:compile, org.sonatype.plexus:plexus-sec-dispatcher=org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile, org.sonatype.plexus:plexus-cipher=org.sonatype.plexus:plexus-cipher:jar:1.4:compile, org.apache.commons:commons-lang3=org.apache.commons:commons-lang3:jar:3.1:compile, org.apache.maven.surefire:surefire-api=org.apache.maven.surefire:surefire-api:jar:2.20:compile, org.apache.maven.surefire:surefire-logger-api=org.apache.maven.surefire:surefire-logger-api:jar:2.20:compile, org.apache.maven:maven-toolchain=org.apache.maven:maven-toolchain:jar:2.2.1:compile, org.apache.maven.plugin-tools:maven-plugin-annotations=org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:compile}
[DEBUG]   (f) pluginDescriptor = Component Descriptor: role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.maven.plugin.surefire.HelpMojo', role hint: 'org.apache.maven.plugins:maven-surefire-plugin:2.20:help'
role: 'org.apache.maven.plugin.Mojo', implementation: 'org.apache.maven.plugin.surefire.SurefirePlugin', role hint: 'org.apache.maven.plugins:maven-surefire-plugin:2.20:test'
---
[DEBUG]   (s) printSummary = true
[DEBUG]   (s) projectArtifactMap = {org.junit.jupiter:junit-jupiter-api=org.junit.jupiter:junit-jupiter-api:jar:5.0.0-M5:test, org.opentest4j:opentest4j=org.opentest4j:opentest4j:jar:1.0.0-M2:test, org.junit.platform:junit-platform-commons=org.junit.platform:junit-platform-commons:jar:1.0.0-M5:test, org.junit.jupiter:junit-jupiter-params=org.junit.jupiter:junit-jupiter-params:jar:5.0.0-M5:test, org.junit.platform:junit-platform-runner=org.junit.platform:junit-platform-runner:jar:1.0.0-M5:test, org.junit.platform:junit-platform-launcher=org.junit.platform:junit-platform-launcher:jar:1.0.0-M5:test, org.junit.platform:junit-platform-engine=org.junit.platform:junit-platform-engine:jar:1.0.0-M5:test, org.junit.platform:junit-platform-suite-api=org.junit.platform:junit-platform-suite-api:jar:1.0.0-M5:test, junit:junit=junit:junit:jar:4.12:test, org.hamcrest:hamcrest-core=org.hamcrest:hamcrest-core:jar:1.3:test}
[DEBUG]   (s) projectBuildDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target
[DEBUG]   (s) redirectTestOutputToFile = false
[DEBUG]   (s) remoteRepositories = [      id: central
      url: https://repo.maven.apache.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => never]
]
[DEBUG]   (s) reportFormat = brief
[DEBUG]   (s) reportsDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/surefire-reports
[DEBUG]   (f) rerunFailingTestsCount = 0
[DEBUG]   (f) reuseForks = true
[DEBUG]   (s) runOrder = filesystem
[DEBUG]   (f) shutdown = testset
[DEBUG]   (s) skip = false
[DEBUG]   (f) skipAfterFailureCount = 0
[DEBUG]   (s) skipTests = false
[DEBUG]   (s) suiteXmlFiles = []
[DEBUG]   (s) tempDir = surefire
[DEBUG]   (s) testClassesDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/test-classes
[DEBUG]   (s) testFailureIgnore = false
[DEBUG]   (s) testNGArtifactName = org.testng:testng
[DEBUG]   (s) testSourceDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/src/test/java
[DEBUG]   (s) threadCountClasses = 0
[DEBUG]   (s) threadCountMethods = 0
[DEBUG]   (s) threadCountSuites = 0
[DEBUG]   (s) trimStackTrace = true
[DEBUG]   (s) useFile = true
[DEBUG]   (s) useManifestOnlyJar = true
[DEBUG]   (s) useSystemClassLoader = true
[DEBUG]   (s) useUnlimitedThreads = false
[DEBUG]   (s) workingDirectory = /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array
[DEBUG]   (s) project = MavenProject: com.gmail.manavbrar.pmitivearray:primitive.array:0.0.1-SNAPSHOT @ /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/pom.xml
[DEBUG]   (s) session = org.apache.maven.execution.MavenSession@4e76dac
[DEBUG] -- end configuration --
[DEBUG] Surefire report directory: /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/surefire-reports
[DEBUG] Using configured provider org.junit.platform.surefire.provider.JUnitPlatformProvider
[DEBUG] Setting system property [user.dir]=[/Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array]
[DEBUG] Setting system property [localRepository]=[/Users/manavdeepbrar/.m2/repository]
[DEBUG] Setting system property [basedir]=[/Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array]
[DEBUG] parallel='none', perCoreThreadCount=true, threadCount=0, useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, threadCountMethods=0, parallelOptimized=true
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.surefire:surefire-booter:jar:2.20:compile (selected for compile)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.20:compile (selected for compile)
[DEBUG]       org.apache.maven.surefire:surefire-logger-api:jar:2.20:compile (selected for compile)
[DEBUG] Adding to surefire booter test classpath: /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-booter/2.20/surefire-booter-2.20.jar Scope: compile
[DEBUG] Adding to surefire booter test classpath: /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-api/2.20/surefire-api-2.20.jar Scope: compile
[DEBUG] Adding to surefire booter test classpath: /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-logger-api/2.20/surefire-logger-api-2.20.jar Scope: compile
[DEBUG] Using JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java
[DEBUG] dummy:dummy:jar:1.0 (selected for null)
[DEBUG]   org.apache.maven.plugins:maven-surefire-plugin:maven-plugin:2.20: (selected for )
[DEBUG]     org.apache.maven:maven-plugin-api:jar:2.2.1:runtime (selected for runtime)
[DEBUG]     org.apache.maven.surefire:maven-surefire-common:jar:2.20:runtime (selected for runtime)
[DEBUG]       org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-artifact:jar:3.0:runtime (selected for runtime)
[DEBUG]           org.codehaus.plexus:plexus-utils:jar:2.0.4:runtime (selected for runtime)
[DEBUG]       org.apache.maven.surefire:surefire-api:jar:2.20:runtime (selected for runtime)
[DEBUG]         org.apache.maven.surefire:surefire-logger-api:jar:2.20:runtime (selected for runtime)
[DEBUG]       org.apache.maven.surefire:surefire-booter:jar:2.20:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-artifact:jar:3.0:runtime (removed - nearer found: 2.2.1)
[DEBUG]       org.apache.maven:maven-artifact:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.5.15:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-plugin-descriptor:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:runtime (selected for runtime)
[DEBUG]           junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG]           org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (removed - nearer found: 1.5.15)
[DEBUG]           classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-project:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-settings:jar:2.2.1:runtime (selected for runtime)
[DEBUG]           org.apache.maven:maven-model:jar:2.2.1:runtime (selected for runtime)
[DEBUG]           org.codehaus.plexus:plexus-interpolation:jar:1.11:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-profile:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-model:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-artifact-manager:jar:2.2.1:runtime (selected for runtime)
[DEBUG]           org.apache.maven:maven-repository-metadata:jar:2.2.1:runtime (selected for runtime)
[DEBUG]           org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:runtime (selected for runtime)
[DEBUG]             org.codehaus.plexus:plexus-utils:jar:1.4.2:runtime (removed - nearer found: 1.5.15)
[DEBUG]           backport-util-concurrent:backport-util-concurrent:jar:3.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-plugin-registry:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.codehaus.plexus:plexus-interpolation:jar:1.11:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-model:jar:2.2.1:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-core:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven.wagon:wagon-http:jar:1.0-beta-6:runtime (selected for runtime)
[DEBUG]           org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6:runtime (selected for runtime)
[DEBUG]             nekohtml:xercesMinimal:jar:1.9.6.2:runtime (selected for runtime)
[DEBUG]             nekohtml:nekohtml:jar:1.9.6.2:runtime (selected for runtime)
[DEBUG]             commons-httpclient:commons-httpclient:jar:3.1:runtime (selected for runtime)
[DEBUG]               commons-codec:commons-codec:jar:1.2:runtime (selected for runtime)
[DEBUG]         org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6:runtime (selected for runtime)
[DEBUG]           org.apache.jackrabbit:jackrabbit-webdav:jar:1.5.0:runtime (selected for runtime)
[DEBUG]             org.apache.jackrabbit:jackrabbit-jcr-commons:jar:1.5.0:runtime (selected for runtime)
[DEBUG]             org.slf4j:slf4j-api:jar:1.5.3:runtime (selected for runtime)
[DEBUG]             commons-httpclient:commons-httpclient:jar:3.0:runtime (removed - nearer found: 3.1)
[DEBUG]           org.slf4j:slf4j-nop:jar:1.5.3:runtime (selected for runtime)
[DEBUG]         org.slf4j:slf4j-jdk14:jar:1.5.6:runtime (selected for runtime)
[DEBUG]           org.slf4j:slf4j-api:jar:1.5.3:runtime (removed - nearer found: 1.5.6)
[DEBUG]           org.slf4j:slf4j-api:jar:1.5.6:runtime (selected for runtime)
[DEBUG]         org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime (selected for runtime)
[DEBUG]         org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:runtime (selected for runtime)
[DEBUG]           org.apache.maven.doxia:doxia-logging-api:jar:1.1:runtime (selected for runtime)
[DEBUG]             org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30:runtime (removed - nearer found: 1.0-alpha-9-stable-1)
[DEBUG]         org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:runtime (selected for runtime)
[DEBUG]           org.codehaus.plexus:plexus-utils:jar:1.4.2:runtime (removed - nearer found: 1.5.15)
[DEBUG]         org.apache.maven:maven-repository-metadata:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-error-diagnostics:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         org.apache.maven:maven-monitor:jar:2.2.1:runtime (selected for runtime)
[DEBUG]         classworlds:classworlds:jar:1.1-alpha-2:runtime (removed - nearer found: 1.1)
[DEBUG]         classworlds:classworlds:jar:1.1:runtime (selected for runtime)
[DEBUG]         org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:runtime (selected for runtime)
[DEBUG]           org.codehaus.plexus:plexus-utils:jar:1.5.5:runtime (removed - nearer found: 1.5.15)
[DEBUG]           org.sonatype.plexus:plexus-cipher:jar:1.4:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-toolchain:jar:2.2.1:runtime (selected for runtime)
[DEBUG]       org.apache.commons:commons-lang3:jar:3.1:runtime (selected for runtime)
[DEBUG]     org.apache.maven.surefire:surefire-api:jar:2.20:runtime (selected for runtime)
[DEBUG]       org.apache.maven.surefire:surefire-logger-api:jar:2.20:runtime (selected for runtime)
[DEBUG]     org.apache.maven:maven-toolchain:jar:2.2.1:runtime (selected for runtime)
[DEBUG]     org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.3:runtime (selected for runtime)
[DEBUG]       org.apache.maven:maven-artifact:jar:3.0:runtime (removed - nearer found: 2.2.1)
[DEBUG] test classpath:  /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/test-classes  /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/classes  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.0.0-M5/junit-jupiter-api-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/opentest4j/opentest4j/1.0.0-M2/opentest4j-1.0.0-M2.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-commons/1.0.0-M5/junit-platform-commons-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.0.0-M5/junit-jupiter-params-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-runner/1.0.0-M5/junit-platform-runner-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-launcher/1.0.0-M5/junit-platform-launcher-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-engine/1.0.0-M5/junit-platform-engine-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-suite-api/1.0.0-M5/junit-platform-suite-api-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/junit/junit/4.12/junit-4.12.jar  /Users/manavdeepbrar/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[DEBUG] provider classpath:  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-surefire-provider/1.0.0-M5/junit-platform-surefire-provider-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-launcher/1.0.0-M5/junit-platform-launcher-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/common-java5/2.19.1/common-java5-2.19.1.jar  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.0.0-M5/junit-jupiter-engine-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-engine/1.0.0-M5/junit-platform-engine-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-commons/1.0.0-M5/junit-platform-commons-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/opentest4j/opentest4j/1.0.0-M2/opentest4j-1.0.0-M2.jar  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.0.0-M5/junit-jupiter-api-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/junit/junit/4.12/junit-4.12.jar  /Users/manavdeepbrar/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[DEBUG] test(compact) classpath:  test-classes  classes  junit-jupiter-api-5.0.0-M5.jar  opentest4j-1.0.0-M2.jar  junit-platform-commons-1.0.0-M5.jar  junit-jupiter-params-5.0.0-M5.jar  junit-platform-runner-1.0.0-M5.jar  junit-platform-launcher-1.0.0-M5.jar  junit-platform-engine-1.0.0-M5.jar  junit-platform-suite-api-1.0.0-M5.jar  junit-4.12.jar  hamcrest-core-1.3.jar
[DEBUG] provider(compact) classpath:  junit-platform-surefire-provider-1.0.0-M5.jar  junit-platform-launcher-1.0.0-M5.jar  common-java5-2.19.1.jar  junit-jupiter-engine-5.0.0-M5.jar  junit-platform-engine-1.0.0-M5.jar  junit-platform-commons-1.0.0-M5.jar  opentest4j-1.0.0-M2.jar  junit-jupiter-api-5.0.0-M5.jar  junit-4.12.jar  hamcrest-core-1.3.jar  maven-reporting-api-3.0.jar
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[DEBUG] boot classpath:  /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-booter/2.20/surefire-booter-2.20.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-api/2.20/surefire-api-2.20.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/surefire-logger-api/2.20/surefire-logger-api-2.20.jar  /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/test-classes  /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/classes  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.0.0-M5/junit-jupiter-api-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/opentest4j/opentest4j/1.0.0-M2/opentest4j-1.0.0-M2.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-commons/1.0.0-M5/junit-platform-commons-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.0.0-M5/junit-jupiter-params-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-runner/1.0.0-M5/junit-platform-runner-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-launcher/1.0.0-M5/junit-platform-launcher-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-engine/1.0.0-M5/junit-platform-engine-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-suite-api/1.0.0-M5/junit-platform-suite-api-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/junit/junit/4.12/junit-4.12.jar  /Users/manavdeepbrar/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar  /Users/manavdeepbrar/.m2/repository/org/junit/platform/junit-platform-surefire-provider/1.0.0-M5/junit-platform-surefire-provider-1.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/surefire/common-java5/2.19.1/common-java5-2.19.1.jar  /Users/manavdeepbrar/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.0.0-M5/junit-jupiter-engine-5.0.0-M5.jar  /Users/manavdeepbrar/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[DEBUG] boot(compact) classpath:  surefire-booter-2.20.jar  surefire-api-2.20.jar  surefire-logger-api-2.20.jar  test-classes  classes  junit-jupiter-api-5.0.0-M5.jar  opentest4j-1.0.0-M2.jar  junit-platform-commons-1.0.0-M5.jar  junit-jupiter-params-5.0.0-M5.jar  junit-platform-runner-1.0.0-M5.jar  junit-platform-launcher-1.0.0-M5.jar  junit-platform-engine-1.0.0-M5.jar  junit-platform-suite-api-1.0.0-M5.jar  junit-4.12.jar  hamcrest-core-1.3.jar  junit-platform-surefire-provider-1.0.0-M5.jar  common-java5-2.19.1.jar  junit-jupiter-engine-5.0.0-M5.jar  maven-reporting-api-3.0.jar
[DEBUG] Forking command line: /bin/sh -c cd /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array && /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/bin/java -jar /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/surefire/surefirebooter2469316749007257509.jar /Users/manavdeepbrar/Documents/Coursera_algorithmic_toolbox/primitive.array/target/surefire 2017-07-16T18-55-03_793-jvmRun1 surefire8111336754767961212tmp surefire_06517069218495854312tmp
[INFO] Running com.gmail.manavbrar.primitivearray.AppTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.603 s
[INFO] Finished at: 2017-07-16T18:55:07-07:00
[INFO] Final Memory: 15M/1781M
[INFO] ------------------------------------------------------------------------
[ERROR] Java heap space -> [Help 1]
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:3332)
    at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
    at java.lang.StringBuilder.append(StringBuilder.java:136)
    at org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException.getLocalizedMessage(MultipleFailureException.java:52)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter$CloseableCloser.run(ForkStarter.java:200)
    at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils$1.call(CommandLineUtils.java:282)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:626)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
    at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)

Deliverables

  • [x] Support primitive arrays with parameterized tests.
Jupiter programming model bug

Most helpful comment

But to answer your question... 5.0 M6... which _just_ got released: https://github.com/junit-team/junit5/releases/tag/r5.0.0-M6 馃槈

All 8 comments

maven-surefire-plugin:2.20 produces the OOM. See for https://github.com/junit-team/junit5/issues/855 details.

The underlying error is: org.junit.platform.commons.util.PreconditionViolationException: Cannot convert instance of [I into a Stream: [I@38c6f217

If you change the return type to IntStream, it works:

  public static IntStream intdata() {
    return IntStream.of(3, 24, 12);
  }

About to enhance the CollectionUtils.toStream with:

    if (object instanceof double[]) {
          return DoubleStream.of((double[]) object).boxed();
    }
    if (object instanceof int[]) {
          return IntStream.of((int[]) object).boxed();
    }
    if (object instanceof long[]) {
          return LongStream.of((long[]) object).boxed();
    }

How about other primitive array types?

Will also add support for:

  • boolean[]
  • byte[]
  • char[]
  • float[]
  • short[]

Thanks for the report @braghome -- issue is fixed in master via #954

@sormuras with which release will this change be published

The release is always selected for an issue.

See the _Milestone_ section of the right-hand side of this page.

But to answer your question... 5.0 M6... which _just_ got released: https://github.com/junit-team/junit5/releases/tag/r5.0.0-M6 馃槈

Was this page helpful?
0 / 5 - 0 ratings