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

Make integration test use standard dist #2867

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ on:
- 'site/**'
workflow_dispatch:

env:
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3

jobs:
test:

Expand All @@ -49,8 +46,6 @@ jobs:
with:
java-version: 1.8

- name: Build tar
run: ./gradlew stream:server:build -x test
- name: run cluster integration test
run: ./gradlew :tests:integration:cluster:test -Dtestlogger.theme=plain
- name: run smoke test
Expand Down
1 change: 1 addition & 0 deletions bookkeeper-dist/server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ releaseArtifacts {
dependencies {
implementation project(':bookkeeper-server')
implementation project(':bookkeeper-stats-providers:prometheus-metrics-provider')
implementation project(':bookkeeper-http:vertx-http-server')
implementation project(':bookkeeper-stats')
implementation project(':stream:distributedlog:core')
implementation project(':stream:server')
Expand Down
4 changes: 2 additions & 2 deletions tests/docker-images/statestore-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ RUN mkdir /opt/bookkeeper/conf
RUN mkdir /opt/bookkeeper/scripts

### -----Copy Jars------###
ADD ./dist/server.tar.gz /opt/
RUN mv /opt/server/lib/*.jar /opt/bookkeeper/lib/
ADD ./dist/bookkeeper-server-*.*SNAPSHOT.tar.gz /opt/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this way the integration tests won't run in a release version branch, correct? (without -SNAPSHOT suffix)
I think we must not break this
I suggest to use
bookkeeper-server-*.tar.gz

Copy link
Member Author

@pkumar-singh pkumar-singh Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, as part of normal CI. It builds release version at location. bookkeeper-dist/server/build/distributions is built every time, and name of the tarball always contains SNAPSHOT. If you think a situation where name would not contain SNAPSHOT. Sure we can remove. In fact it hardly matters either way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should we able to run the tests on the source release, because people would want to build and run tests from the source tarball.
This is very important for a ASF project

Copy link
Member Author

@pkumar-singh pkumar-singh Oct 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. I think we are not building src tar ball.

RUN mv /opt/bookkeeper-server-*.*SNAPSHOT/lib/*.jar /opt/bookkeeper/lib/
### --------------------###

### ----Copy scripts----------###
Expand Down
2 changes: 1 addition & 1 deletion tests/docker-images/statestore-image/image_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mkdir "${BASE_DIR}"/tests/docker-images/statestore-image/scripts
mkdir "${BASE_DIR}"/tests/docker-images/statestore-image/temp_conf
mkdir "${BASE_DIR}"/tests/docker-images/statestore-image/temp_bin

cp "${BASE_DIR}"/stream/server/build/distributions/server.tar.gz "${BASE_DIR}"/tests/docker-images/statestore-image/dist
cp "${BASE_DIR}"/bookkeeper-dist/server/build/distributions/bookkeeper-server-*.*SNAPSHOT.tar.gz "${BASE_DIR}"/tests/docker-images/statestore-image/dist
cp "${BASE_DIR}"/docker/scripts/* "${BASE_DIR}"/tests/docker-images/statestore-image/scripts
cp "${BASE_DIR}"/conf/* "${BASE_DIR}"/tests/docker-images/statestore-image/temp_conf
cp "${BASE_DIR}"/bin/* "${BASE_DIR}"/tests/docker-images/statestore-image/temp_bin
Expand Down
1 change: 1 addition & 0 deletions tests/integration/cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {
}

task buildImage(type:Exec) {
dependsOn ':bookkeeper-dist-server:distTar'
workingDir '../../..'
commandLine './tests/docker-images/statestore-image/image_builder.sh'
}
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/standalone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {
}

dependencies {
implementation project(':bookkeeper-dist-server')
testImplementation project(path: ':bookkeeper-common', configuration: 'testArtifacts')
testImplementation project(':bookkeeper-server')
testImplementation project(':tests:integration-tests-utils')
Expand All @@ -35,6 +36,7 @@ dependencies {
}

task buildImage(type:Exec) {
dependsOn ':bookkeeper-dist-server:distTar'
workingDir '../../..'
commandLine './tests/docker-images/statestore-image/image_builder.sh'
}
Expand Down