Skip to content

Commit

Permalink
less logs during the build (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
malafeev committed Jan 22, 2019
1 parent 7eb85f0 commit 0b1bc5d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ language: java
jdk:
- oraclejdk8

git:
quiet: true

cache:
directories:
- $HOME/.m2/repository
Expand All @@ -20,7 +23,7 @@ before_install:

install:
# Override default travis to use the maven wrapper
- ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -q

script:
- ./travis/publish.sh
Expand All @@ -30,7 +33,7 @@ branches:
- /^[0-9]/

after_success:
- mvn jacoco:report coveralls:report
- mvn -q jacoco:report coveralls:report

env:
global:
Expand Down
6 changes: 6 additions & 0 deletions opentracing-redis-redisson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
import redis.embedded.RedisServer;

import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

import static org.awaitility.Awaitility.await;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
Expand Down Expand Up @@ -178,6 +181,8 @@ public void async_continue_span() throws Exception {
}).get(15, TimeUnit.SECONDS));

}

await().atMost(15, TimeUnit.SECONDS).until(reportedSpansSize(), equalTo(2));
List<MockSpan> spans = tracer.finishedSpans();
assertEquals(2, spans.size());

Expand All @@ -192,4 +197,8 @@ private void checkSpans(List<MockSpan> spans) {
assertEquals(0, span.generatedErrors().size());
}
}

private Callable<Integer> reportedSpansSize() {
return () -> tracer.finishedSpans().size();
}
}
8 changes: 4 additions & 4 deletions travis/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,23 @@ if ! is_pull_request && build_started_by_tag; then
check_release_tag
fi

./mvnw install -nsu
./mvnw install -nsu -q

# If we are on a pull request, our only job is to run tests, which happened above via ./mvnw install
if is_pull_request; then
true
# If we are on master, we will deploy the latest snapshot or release version
# - If a release commit fails to deploy for a transient reason, delete the broken version from bintray and click rebuild
elif is_travis_branch_master; then
./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DskipTests deploy
./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -q -DskipTests deploy

# If the deployment succeeded, sync it to Maven Central. Note: this needs to be done once per project, not module, hence -N
if is_release_commit; then
./mvnw --batch-mode -s ./.settings.xml -nsu -N io.zipkin.centralsync-maven-plugin:centralsync-maven-plugin:sync
./mvnw --batch-mode -s ./.settings.xml -nsu -q -N io.zipkin.centralsync-maven-plugin:centralsync-maven-plugin:sync
fi

# If we are on a release tag, the following will update any version references and push a version tag for deployment.
elif build_started_by_tag; then
safe_checkout_master
./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -DreleaseVersion="$(release_version)" -Darguments="-DskipTests" release:prepare
./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -q -DreleaseVersion="$(release_version)" -Darguments="-DskipTests" release:prepare
fi

0 comments on commit 0b1bc5d

Please sign in to comment.