profile
viewpoint
Christian Stein sormuras @micromata Europe https://sormuras.github.io @openjdk | @junit-team | @apache

sormuras/bach 152

🎼 Java Shell Builder - Build modular Java projects with JDK tools

c-guntur/java-katas 145

One repo to rule them all. All Java Katas in one repo. #AllTestsGreenWithJDK14 #BuildsCleanWithJava15

forax/pro 85

A Java build tool that works seamlessly with modules

jbee/purejin 67

java dependency injection through code

jodastephen/jpms-module-names 37

Module names for the Java Module System (JPMS)

sormuras/awesome-java-module-system 37

🕶 A curated list of resources related to the Java Module System (JSR 376)

openjdk/jdk-sandbox 16

JDK Committers Sandbox

micromata/sawdust 14

Java module system and JUnit 5 tests

sormuras/application-junit5-jdk9-demo 12

Using JUnit 5 with IDEA on Java 9

sormuras/bartholdy 7

Generic tooling support framework

push eventjunit-team/junit5

Marc Philipp

commit sha d1234f1c23eef133c68283faa58ccac048cdfcd5

Use javaLanguageVersion if its less than 15

view details

push time in 12 minutes

push eventjunit-team/junit5

Marc Philipp

commit sha f35ec81e2dfaaa7d4ba3373e0966d8070c17693e

Enable build scans and build cache for CodeQL builds

view details

push time in 28 minutes

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

Fun thing (not sure if "fun" is that right ;)) is that if you drop the "if private fail" check it works on private fields :(.

rmannibucau

comment created time in an hour

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

At this point I don't think it's worth the added complexity.

rmannibucau

comment created time in an hour

startedboblauer/MockDate

started time in an hour

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

@marcphilipp I can understand that as well. How about an engine parameter "allowedVisibility"? I know it is a toggle but not a crazy one IMHO.

rmannibucau

comment created time in an hour

push eventjunit-team/junit5

Marc Philipp

commit sha 047f739852d4d29b21f329c9ef9b6325df88a626

Pin Groovy compilation to use JDK 15 for now

view details

push time in 2 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

I can understand your use case but it would be inconsistent to allow private on fields but not on methods and I really don't want to allow it for methods. 😕

rmannibucau

comment created time in 2 hours

PublicEvent

push eventjunit-team/junit5

Marc Philipp

commit sha d54bb96ebd55a84b756ebb1792d702d33a038b20

Upgrade Groovy for JDK 16 support

view details

push time in 2 hours

push eventjunit-team/junit5

Marc Philipp

commit sha fdac06b72901f83da28691019cfc305e1163d7a0

Upgrade test-retry plugin to 1.2.0

view details

Marc Philipp

commit sha 072b480061d955cec889d4c62f7de8e2b87059df

Upgradle to 6.8-rc-1

view details

push time in 3 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

@marcphilipp yep, funnily I was not "hit" by that on methods (guess rules I used are not very strict for methods).

rmannibucau

comment created time in 3 hours

startedtschuchortdev/kotlin-compile-testing

started time in 4 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

IIUC you're mostly concerned about fields not allowed to be private with @RegisterExtension?

rmannibucau

comment created time in 4 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

@marcphilipp cause it is common to enable private fields and forbids protected or package ones due to the leak it does (regarding encapsulation). In other words it means your test style can't be your main code style (mixed with nested test classes it starts to becomes hard to validate but even when physically split it not not good to code differently depending folders of the same project IMHO). More techincally, on an IDE point of view you get completion from friend classes which is also a noise you don't desire when writing tests IMHO. Hope it is clearer written this way.

rmannibucau

comment created time in 4 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

What violates style validations?

rmannibucau

comment created time in 5 hours

issue closedjunit-team/junit5

Passing TestExecutionListener to engine launched by EngineTestKit

In junit-pioneer/junit-pioneer#375, we failed to write an integration test for an extension because it includes a TestExectionListener and the test run we launch with EngineTestKit didn't pick it up (at least it didn't call methods like reportingEntryPublished and executionFinished for the tests executed by that engine). Is that behavior intentional?

If so and it can't be changed (it would be somewhat weird to have an execution listener that listens to both the actual Jupiter run, but then also to the engine launched during one of those tests), it would be nice if we'd be able to register a listener explicitly. The EngineExecutionListener comes close, but I didn't find a way to register our own implementation.

closed time in 5 hours

nipafx

issue commentjunit-team/junit5

Passing TestExecutionListener to engine launched by EngineTestKit

Team decision: The EngineTestKit is meant for testing engines. We had originally envisioned potentially adding a LauncherTestKit or sth. similar later. If you need to integration test with a TestExecutionListener, please use the Launcher API directly for the time being.

nipafx

comment created time in 5 hours

issue closedjunit-team/junit5

[IJ IDE] JUnit Jupiter Assumptions do not work in @BeforeAll methods

I am still seen this issue on intelliJ

org.junit.jupiter junit-jupiter-api 5.7.0 test IntelliJ IDEA 2020.2.4 (Community Edition) Build #IC-202.8194.7, built on November 24, 2020 Runtime version: 11.0.9+11-b944.49 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.16 GC: ParNew, ConcurrentMarkSweep Memory: 725M Cores: 8

image

closed time in 6 hours

Diego11914

issue commentjunit-team/junit5

[IJ IDE] JUnit Jupiter Assumptions do not work in @BeforeAll methods

@BeforeAll methods have to be static unless you change the default test instance lifecycle to PER_CLASS.

Diego11914

comment created time in 6 hours

issue commentjunit-team/junit5

Add Assumptions.assumeDoesNotThrow

Team decision: Your request sounds reasonable, but we're unsure how generally useful it is given it hasn't been requested before. Thus, changing the status to "waiting for interest".

ST-DDT

comment created time in 6 hours

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

Side note: it violates several style validations and common practises in terms of visibility (why Test2 can check Test1 extensions?), in particular when integrating with 3rd parties (which almost all allows private injections) so overal it makes the test class inconsistent. Any hope it gets revised with wider scope than just junit scope?

rmannibucau

comment created time in 6 hours

issue closedjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

Hi,

In java there is no real reason to support package scope member but not private ones so let's drop that constraint in next release please.

Romain

closed time in 6 hours

rmannibucau

issue commentjunit-team/junit5

Allow fields, methods, and constructors in Jupiter to be private

Team decision: We support package-private methods because they're shorter to write and are in accordance with the convention of placing test classes in the same package as production code.

rmannibucau

comment created time in 6 hours

push eventsormuras/bach

github-actions

commit sha b9c3d2fd1b42c52f77a2499b3971539eddb265e9

Update install-jdk.properties

view details

push time in 8 hours

release sormuras/bach

early-access

released time in 9 hours

startedDataDog/glommio

started time in 15 hours

issue openedjunit-team/junit5

[IJ IDE] JUnit Jupiter Assumptions do not work in @BeforeAll methods

I am still seen this issue on intelliJ

org.junit.jupiter junit-jupiter-api 5.7.0 test IntelliJ IDEA 2020.2.4 (Community Edition) Build #IC-202.8194.7, built on November 24, 2020 Runtime version: 11.0.9+11-b944.49 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.16 GC: ParNew, ConcurrentMarkSweep Memory: 725M Cores: 8

image

created time in 20 hours

issue commentjunit-team/junit5

JUnit Jupiter Assumptions do not work in @BeforeAll methods

I am still seen this issue on intelliJ image

jkarshin

comment created time in 20 hours

issue commentjunit-team/junit5

Declarative timeout does not interrupt code running in infinite loop

Here is an example in which @Timeout does fail (on a "performance bug") but only after 30 seconds instead of 1 second as expected:

class Tests {
    @Timeout(1)
    @Test fun `large input`() {
        val random = Random(seed = 42)
        val ints = generateSequence { random.nextInt(-105, 106) }.take(3000).toList()

        val triplets = ints.findZeroSumTriplets()
        assertThat(triplets.size, equalTo(303))
    }
}

fun List<Int>.findZeroSumTriplets(): Set<Triplet> {
    val result = HashSet<Triplet>()
    0.rangeTo(lastIndex - 2).forEach { i1 ->
        (i1 + 1).rangeTo(lastIndex - 1).forEach { i2 ->
            (i2 + 1).rangeTo(lastIndex).forEach { i3 ->
                if (this[i1] + this[i2] + this[i3] == 0) {
                    result.add(Triplet(this[i1], this[i2], this[i3]))
                }
            }
        }
    }
    return result
}

data class Triplet(val value: List<Int>) {
    constructor(first: Int, second: Int, third: Int): this(listOf(first, second, third).sorted())
    init {
        require(value.size == 3 && value == value.sorted())
    }
}
praenubilus

comment created time in a day

more