usethesource / capsule

The Capsule Hash Trie Collections Library
BSD 2-Clause "Simplified" License
404 stars 27 forks source link

Introduce Gradle build configuration in Kotlin DSL #29

Closed msteindorfer closed 2 years ago

msteindorfer commented 2 years ago

The PR covers:

  1. adding Gradle build configuration in Kotlin DSL (build.gradle.kts)
  2. adding Gradle wrapper script and jar
  3. explicitly generate Automatic-Module-Name manifest attribute
  4. introduce test case filters

In contrast to mvn test, ./gradlew test appears to also work JUnit Quickcheck test suites and executes them.

Known Issue

The increased coverage added with #28 reveals an issue related to hash collision handling of SetMultimap, see test output below:

> Task :test

io.usethesource.capsule.SetMultimapPropertiesTestSuite$PersistentTrieSetMultimapTest > sizeAfterInsertKeyValues FAILED
    java.lang.AssertionError at Assert.java:89
        Caused by: java.lang.AssertionError at Assert.java:89

io.usethesource.capsule.SetMultimapPropertiesTestSuite$PersistentBidirectionalTrieSetMultimapTest > sizeAfterInsertKeyValues FAILED
    java.lang.AssertionError at PropertyVerifier.java:114
        Caused by: java.lang.UnsupportedOperationException at PersistentTrieSetMultimap.java:2141

io.usethesource.capsule.SetMultimapPropertiesTestSuite$PersistentTrieSetMultimapTest > sizeAfterTransientInsertKeyValues FAILED
    java.lang.AssertionError at PropertyVerifier.java:114
        Caused by: java.lang.UnsupportedOperationException at PersistentTrieSetMultimap.java:2141

128 tests completed, 3 failed

Running the tests with the added ignoreKnownFailures flag (i.e., ./gradlew test -PignoreKnownFailures) would exclude the failing tests. A proper fix for the underlying issue will be seeded in a subsequent PR.

Follow-up Action Items