-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Junit5 tests and fix CI that has been broken #4197
Add support for Junit5 tests and fix CI that has been broken #4197
Conversation
- upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests
@merlimat @hangc0276 @BewareMyPower please review |
@nicoloboschi @eolivelli please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
thanks for taking care of the testing framework
Good job! |
… docker image building)
…on of ubuntu 22.10 (kinetic) is EOL since July 20 2023
902c750
to
804f21b
Compare
25ba26b
to
56d8e43
Compare
…ig for the annotation processor)
- LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid
00297b0
to
6ffda5c
Compare
@eolivelli Integration tests have been ignored in apache/bookkeeper CI for a very long time. Here's some evidence: #3675 (comment) . I had to fix a bug in |
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7) # Conflicts: # pom.xml
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7)
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7)
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7)
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7)
* Add support for Junit5 tests and fix CI that has been broken (#4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7) * Fix logging configurations are broken in docker image (#4137) (cherry picked from commit 9dab139) --------- Co-authored-by: 萧易客 <[email protected]>
* Add support for Junit5 tests and fix CI that has been broken (#4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 7bd91a7) * Sync bk-ci.yml from master and delete other workflows * Don't backport windows build changes to the build or CI * Upgrade jna to 5.13.0 * migrate apply-config-from-env.py from python2 to python3 (#3614) Fix #3549 Descriptions of the changes in this PR: migrate apply-config-from-env.py from python2 to python3 fix docker/Dockerfile ### Motivation Issue 3549: migrate apply-config-from-env.py from python2 to python3 ### Changes add newline character, and reformat for docker/Dockerfile change print to print() Master Issue: 3549 * Fix logging configurations are broken in docker image (#4137) --------- Co-authored-by: xiang092689 <[email protected]> Co-authored-by: 萧易客 <[email protected]>
…4197) * Add support for Junit5 tests - upgrade surefire plugin - replace <forkMode>always</forkMode> with supported way in newer maven-surefire-plugin - maven-failsafe-plugin version must match maven-surefire-plugin version - remove invalid test case. Log4j is in the classpath for other reasons checked by running "mvn -pl tests/integration-tests-utils/pom.xml test -X" also verified by debugging that it's not in the system classpath, it is loaded by the MavenClassLoader - add assertj-core for fluent assertions in tests * Upgrade arquillian-junit-standalone * Fix error in pom.xml * Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException * Pick docker-java-api version that is compatible with arquillian-cube-docker * Fix snakeyaml issue * Fix running of bookkeeper in Docker in tests * Improve GitHub Actions CI workflow logging * Increase client tests timeout * Add script for picking fast ubuntu mirror for docker build * upgrade maven-dependency-plugin version (used for copying .tar.gz for docker image building) * Fix building of the docker image * Increase timeouts for integration tests * Use eclipse-temurin base image * Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS version of ubuntu 22.10 (kinetic) is EOL since July 20 2023 * Build docker image also for backward-compatibility-tests * Install gpg that is required by the scripts * Add UBUNTU_MIRROR * Remove redundancy from integration tests * Fix missing dependency * Fix classpath issues for arquillian-cube * Upgrade actions versions * Fix invalid references in native-io/pom.xml * Fix circe-checksum native library compilation * Migrate Gradle specific settings to Maven * Another attempt to disable backward-compat tests in integration test build job * Add working solution for skipping backward compat tests in the int tests * Attempt to fix issue in locating the file * Fix tar file extraction * Improve solution * Backward compat tests build commands without int tests * Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk * Revisit skipping of backward compat tests once again * Use similar MAVEN_OPTS as there is in Pulsar * Fix directory * Add way to find git root directory * Revisit one more time * Add current-version-image back * Enable tests for backwardCompatTests * Don't create /ledgers in ZK if it already exists * Add uncaughtexceptionhandler * Add exclusions for reload4j * Use maven-surefire 2.8.1 for certain tests * Add failing test back in, also fails with surefire 2.8.1 * Exclude logging implementations * Revert "Use maven-surefire 2.8.1 for certain tests" This reverts commit 94e2b8e. * Exclude log4j * Add instructions how to run on Mac Apple Silicon * Find slf4j version * Block loading some classes * Change context classloader while creating new bookkeeper * Route commons logging to slf4j * Update shrinkwrap.version * Wait for ZK client to shutdown before returning from close * Upgrade Groovy version * Remove arquillian-junit-container which causes tests to be run twice * Skip backward compat tests unless -DbackwardCompatTests is passed * Delay closing of classloaders by 5 seconds * Fix checkstyle * Improve instructions for running tests * Upgrade Testcontainers and import the bom in dependencyManagement * Fix synchronization bug pointed out by spotbugs * upgrade markdown-link-check * Ignore checking Google calendar for dead links * Ignore anchors * Add 2 more patterns to dead link checker exclusions * Collect logs * Log integration tests to console to observe progress, disable retries * Use maven version provided by GitHub Action runner * Improve instructions for docker socket proxy * Add test timeout of 5 minutes for BookieShellTestBase * Fix test to match changes made in e41d672 * Upgrade mockito to 4.11.0 * Align hamcrest with junit * Revert "Upgrade mockito to 4.11.0" This reverts commit 55b7fcd. * Make JAVA_HOME optional * Tune Java's DNS cache timeouts for docker images * Use different directory for JDK 8 * Add tooling to containers that help debugging * Upgrade JMH version and configuration * Specify maven.compiler.release to fix issues with building with Java 11 * Remove gmavenplus plugin since there's already groovy-eclipse compiler in use * Upgrade apache-rat-plugin * Fix validation step * Don't import shaded class * Move freebuilder out of distributed libraries (there was invalid config for the annotation processor) * Remove use of shaded class in test * Upgrade junit5, assertj-core & awaitility to latest stable * Fix simpletest logic - LAC is updated asynchronously. Entries might be unconfirmed when read before ledger is closed. - The last entry id passed to the read method was invalid * Fix SimpleTestCommandTest --------- Co-authored-by: Matteo Merli <[email protected]>
Motivation
Add support for JUnit 5 tests so that tests can be written in modern ways. Parameterized tests in Junit 4 are painful.
Changes
Addition Context
While working on this, it was noticed that apache/bookkeeper maven build hasn't been running all tests in GitHub Actions CI. Mailing list thread: https://lists.apache.org/thread/5c2yr772v6o0kcv717g0csgv44w6wthc
This PR is fixing the broken CI too since broken tests started getting run when Junit 5 test support was added to the maven build.