Skip to content
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

Merged
merged 91 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
7c623c3
Add support for Junit5 tests
lhotari Feb 1, 2024
feb3797
Upgrade arquillian-junit-standalone
lhotari Feb 1, 2024
b161117
Fix error in pom.xml
lhotari Feb 1, 2024
ffbbb4b
Fix java.lang.ClassNotFoundException: javax.ws.rs.ProcessingException
lhotari Feb 1, 2024
5978717
Pick docker-java-api version that is compatible with arquillian-cube-…
lhotari Feb 1, 2024
c497578
Fix snakeyaml issue
lhotari Feb 1, 2024
7bc1fbf
Fix running of bookkeeper in Docker in tests
lhotari Feb 1, 2024
877c984
Improve GitHub Actions CI workflow logging
lhotari Feb 1, 2024
d175b66
Increase client tests timeout
lhotari Feb 1, 2024
17ff058
Add script for picking fast ubuntu mirror for docker build
lhotari Feb 1, 2024
787d305
upgrade maven-dependency-plugin version (used for copying .tar.gz for…
lhotari Feb 1, 2024
734a783
Fix building of the docker image
lhotari Feb 1, 2024
34870a4
Increase timeouts for integration tests
lhotari Feb 1, 2024
ee2ef9f
Use eclipse-temurin base image
lhotari Feb 1, 2024
073b0e9
Replace "FROM ubuntu:22.10" with "FROM ubuntu:22.04" to use LTS versi…
lhotari Feb 1, 2024
6932bba
Build docker image also for backward-compatibility-tests
lhotari Feb 1, 2024
7e18291
Install gpg that is required by the scripts
lhotari Feb 1, 2024
9eaf2d8
Add UBUNTU_MIRROR
lhotari Feb 1, 2024
1bf474d
Remove redundancy from integration tests
lhotari Feb 1, 2024
10bdaa0
Fix missing dependency
lhotari Feb 1, 2024
70ab83c
Fix classpath issues for arquillian-cube
lhotari Feb 1, 2024
e7197b5
Upgrade actions versions
lhotari Feb 1, 2024
5c23550
Fix invalid references in native-io/pom.xml
lhotari Feb 1, 2024
92a4d4c
Fix circe-checksum native library compilation
lhotari Feb 1, 2024
f17e494
Migrate Gradle specific settings to Maven
lhotari Feb 2, 2024
6cbdeb0
Another attempt to disable backward-compat tests in integration test …
lhotari Feb 2, 2024
6e1486a
Add working solution for skipping backward compat tests in the int tests
lhotari Feb 2, 2024
084b527
Attempt to fix issue in locating the file
lhotari Feb 2, 2024
c36017e
Fix tar file extraction
lhotari Feb 2, 2024
274fe5b
Improve solution
lhotari Feb 2, 2024
e248ab0
Backward compat tests build commands without int tests
lhotari Feb 2, 2024
d38ea86
Copy tune-runner-vm and clean-disk from Pulsar CI and clean disk
lhotari Feb 5, 2024
9f08572
Revisit skipping of backward compat tests once again
lhotari Feb 6, 2024
9ac08f3
Use similar MAVEN_OPTS as there is in Pulsar
lhotari Feb 6, 2024
9d5d1b0
Fix directory
lhotari Feb 6, 2024
ecc18d2
Add way to find git root directory
lhotari Feb 6, 2024
cbe437d
Revisit one more time
lhotari Feb 6, 2024
ed1a774
Add current-version-image back
lhotari Feb 6, 2024
26eeb77
Enable tests for backwardCompatTests
lhotari Feb 6, 2024
ea4ece7
Don't create /ledgers in ZK if it already exists
lhotari Feb 6, 2024
146c22b
Add uncaughtexceptionhandler
lhotari Feb 6, 2024
0252965
Add exclusions for reload4j
lhotari Feb 6, 2024
94e2b8e
Use maven-surefire 2.8.1 for certain tests
lhotari Feb 6, 2024
dfb4c23
Add failing test back in, also fails with surefire 2.8.1
lhotari Feb 6, 2024
e3b8f77
Exclude logging implementations
lhotari Feb 6, 2024
e64de6f
Revert "Use maven-surefire 2.8.1 for certain tests"
lhotari Feb 6, 2024
27b1708
Exclude log4j
lhotari Feb 6, 2024
8210201
Add instructions how to run on Mac Apple Silicon
lhotari Feb 6, 2024
68429cf
Find slf4j version
lhotari Feb 6, 2024
c5a666c
Block loading some classes
lhotari Feb 6, 2024
3f62f5c
Change context classloader while creating new bookkeeper
lhotari Feb 6, 2024
4255ca8
Route commons logging to slf4j
lhotari Feb 6, 2024
7710880
Update shrinkwrap.version
lhotari Feb 6, 2024
e41d672
Wait for ZK client to shutdown before returning from close
lhotari Feb 6, 2024
82d4be0
Upgrade Groovy version
lhotari Feb 6, 2024
e315c35
Remove arquillian-junit-container which causes tests to be run twice
lhotari Feb 6, 2024
ea6923a
Skip backward compat tests unless -DbackwardCompatTests is passed
lhotari Feb 6, 2024
3e13e02
Delay closing of classloaders by 5 seconds
lhotari Feb 6, 2024
f8b4140
Fix checkstyle
lhotari Feb 6, 2024
6b6b715
Improve instructions for running tests
lhotari Feb 6, 2024
c165c0a
Upgrade Testcontainers and import the bom in dependencyManagement
lhotari Feb 6, 2024
923b4fd
Fix synchronization bug pointed out by spotbugs
lhotari Feb 6, 2024
aaa3646
upgrade markdown-link-check
lhotari Feb 6, 2024
d4190b0
Ignore checking Google calendar for dead links
lhotari Feb 6, 2024
58db37e
Ignore anchors
lhotari Feb 7, 2024
beecad9
Add 2 more patterns to dead link checker exclusions
lhotari Feb 7, 2024
e83a688
Collect logs
lhotari Feb 7, 2024
3c56105
Log integration tests to console to observe progress, disable retries
lhotari Feb 7, 2024
0a1d893
Use maven version provided by GitHub Action runner
lhotari Feb 7, 2024
84ae4db
Improve instructions for docker socket proxy
lhotari Feb 7, 2024
56548aa
Add test timeout of 5 minutes for BookieShellTestBase
lhotari Feb 7, 2024
0f73055
Fix test to match changes made in e41d6728
lhotari Feb 7, 2024
55b7fcd
Upgrade mockito to 4.11.0
lhotari Feb 7, 2024
7546ea7
Align hamcrest with junit
lhotari Feb 7, 2024
38207ac
Revert "Upgrade mockito to 4.11.0"
lhotari Feb 7, 2024
82b081d
Make JAVA_HOME optional
lhotari Feb 7, 2024
1ef2c5e
Tune Java's DNS cache timeouts for docker images
lhotari Feb 7, 2024
dcf1002
Use different directory for JDK 8
lhotari Feb 7, 2024
3b823cf
Add tooling to containers that help debugging
lhotari Feb 7, 2024
d436e80
Upgrade JMH version and configuration
lhotari Feb 7, 2024
804f21b
Specify maven.compiler.release to fix issues with building with Java 11
lhotari Feb 7, 2024
56d8e43
Remove gmavenplus plugin since there's already groovy-eclipse compile…
lhotari Feb 7, 2024
fa15e9e
Upgrade apache-rat-plugin
lhotari Feb 7, 2024
472349c
Merge branch 'master' into lh-add-support-for-junit5-tests
merlimat Feb 7, 2024
582b88f
Fix validation step
lhotari Feb 8, 2024
05252d0
Don't import shaded class
lhotari Feb 8, 2024
da3bfcd
Move freebuilder out of distributed libraries (there was invalid conf…
lhotari Feb 8, 2024
3607ede
Remove use of shaded class in test
lhotari Feb 8, 2024
d4fc2fb
Upgrade junit5, assertj-core & awaitility to latest stable
lhotari Feb 8, 2024
6ffda5c
Fix simpletest logic
lhotari Feb 8, 2024
d71183f
Fix SimpleTestCommandTest
lhotari Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .dlc.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
},
{
"pattern": "^http://daxue.qq.com/content/content/id/2492"
},
{
"pattern": "^https://calendar.google.com/"
},
{
"pattern": "^#"
},
{
"pattern": ".*\\{\\{.*"
},
{
"pattern": "^//"
}
],
"timeout": "10s",
Expand Down
57 changes: 57 additions & 0 deletions .github/actions/clean-disk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: clean disk
description: makes some more space available on the disk by removing files
inputs:
mode:
description: "Use 'full' to clean as much as possible"
required: false
runs:
using: composite
steps:
- run: |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
directories=(/usr/local/lib/android /opt/ghc)
if [[ "${{ inputs.mode }}" == "full" ]]; then
# remove these directories only when mode is 'full'
directories+=(/usr/share/dotnet /opt/hostedtoolcache/CodeQL)
fi
emptydir=/tmp/empty$$/
mkdir $emptydir
echo "::group::Available diskspace"
time df -BM / /mnt
echo "::endgroup::"
for directory in "${directories[@]}"; do
echo "::group::Removing $directory"
# fast way to delete a lot of files on linux
time sudo eatmydata rsync -a --delete $emptydir ${directory}/
time sudo eatmydata rm -rf ${directory}
time df -BM / /mnt
echo "::endgroup::"
done
echo "::group::Cleaning apt state"
time sudo bash -c "apt-get clean; apt-get autoclean; apt-get -y --purge autoremove"
time df -BM / /mnt
echo "::endgroup::"
fi
echo "::group::Available diskspace"
time df -BM / /mnt
echo "::endgroup::"
shell: bash
73 changes: 72 additions & 1 deletion .github/actions/tune-runner-vm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,79 @@ runs:
steps:
- run: |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "::group::Configure and tune OS"
# Ensure that reverse lookups for current hostname are handled properly
# Add the current IP address, long hostname and short hostname record to /etc/hosts file
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts

# The default vm.swappiness setting is 60 which has a tendency to start swapping when memory
# consumption is high.
# Set vm.swappiness=1 to avoid swapping and allow high RAM usage
echo 1 | sudo tee /proc/sys/vm/swappiness
(
shopt -s nullglob
# Set swappiness to 1 for all cgroups and sub-groups
for swappiness_file in /sys/fs/cgroup/memory/*/memory.swappiness /sys/fs/cgroup/memory/*/*/memory.swappiness; do
echo 1 | sudo tee $swappiness_file > /dev/null
done
) || true

# use "madvise" Linux Transparent HugePages (THP) setting
# https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html
# "madvise" is generally a better option than the default "always" setting
# Based on Azul instructions from https://docs.azul.com/prime/Enable-Huge-Pages#transparent-huge-pages-thp
echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
echo advise | sudo tee /sys/kernel/mm/transparent_hugepage/shmem_enabled
echo defer+madvise | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
echo 1 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag

# tune filesystem mount options, https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
# commit=999999, effectively disables automatic syncing to disk (default is every 5 seconds)
# nobarrier/barrier=0, loosen data consistency on system crash (no negative impact to empheral CI nodes)
sudo mount -o remount,nodiscard,commit=999999,barrier=0 /
sudo mount -o remount,nodiscard,commit=999999,barrier=0 /mnt
# disable discard/trim at device level since remount with nodiscard doesn't seem to be effective
# https://www.spinics.net/lists/linux-ide/msg52562.html
for i in /sys/block/sd*/queue/discard_max_bytes; do
echo 0 | sudo tee $i
done
# disable any background jobs that run SSD discard/trim
sudo systemctl disable fstrim.timer || true
sudo systemctl stop fstrim.timer || true
sudo systemctl disable fstrim.service || true
sudo systemctl stop fstrim.service || true

# stop php-fpm
sudo systemctl stop php8.0-fpm.service || true
sudo systemctl stop php7.4-fpm.service || true
# stop mono-xsp4
sudo systemctl disable mono-xsp4.service || true
sudo systemctl stop mono-xsp4.service || true
sudo killall mono || true

# stop Azure Linux agent to save RAM
sudo systemctl stop walinuxagent.service || true

# enable docker experimental mode which is
# required for using "docker build --squash" / "-Ddocker.squash=true"
daemon_json="$(sudo cat /etc/docker/daemon.json | jq '.experimental = true')"
echo "$daemon_json" | sudo tee /etc/docker/daemon.json
# restart docker daemon
sudo systemctl restart docker
echo '::endgroup::'

# show memory
echo "::group::Available Memory"
free -m
echo '::endgroup::'
# show disk
echo "::group::Available diskspace"
df -BM
echo "::endgroup::"
# show cggroup
echo "::group::Cgroup settings for current cgroup $CURRENT_CGGROUP"
CURRENT_CGGROUP=$(cat /proc/self/cgroup | grep '0::' | awk -F: '{ print $3 }')
sudo cgget -a $CURRENT_CGGROUP || true
echo '::endgroup::'
fi
shell: bash
shell: bash
Loading
Loading