Skip to content

Commit

Permalink
Merge 5f39b49 into 86952e7
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Dec 22, 2018
2 parents 86952e7 + 5f39b49 commit 6870579
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 55 deletions.
73 changes: 73 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2

references:
build: &build
working_directory: ~/repo

environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx2048m
JACOCO: false

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run:
name: Go Offline with Maven
command: mvn dependency:go-offline

- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}

# run tests!
- run:
name: Run integration tests
command: mvn verify

workflows:
version: 2
integration-tests:
jobs:
- zulu-6
- zulu-7
- zulu-8
- zulu-9
- zulu-11

jobs:
zulu-6:
docker:
- image: wavesoftware/circleci-zulujdk:6
<<: *build
zulu-7:
docker:
- image: wavesoftware/circleci-zulujdk:7
<<: *build
zulu-8:
docker:
- image: wavesoftware/circleci-zulujdk:8
<<: *build
zulu-9:
docker:
- image: wavesoftware/circleci-zulujdk:9
<<: *build
zulu-11:
docker:
- image: wavesoftware/circleci-zulujdk:11
<<: *build



5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 4

[*.yml]
indent_size = 2
34 changes: 18 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
language: java
dist: trusty
before_script: mvn dependency:go-offline
script: mvn clean verify --fail-at-end
notifications:
email:
on_failure: true
on_failure: change
matrix:
include:
# Performance testing
- jdk: openjdk7
env: JACOCO=false
- jdk: openjdk8
env: JACOCO=false
# Quality testing
- jdk: openjdk7
env: JACOCO=true
- jdk: openjdk8
env: JACOCO=true COVERALLS=true
- jdk: oraclejdk8
env: JACOCO=true
- jdk: openjdk8
env: JACOCO=true SONAR=publish
script: mvn clean verify sonar:sonar --fail-at-end
# Quality testing
- jdk: oraclejdk8
env: JACOCO=true COVERALLS=true
- jdk: oraclejdk8
env: JACOCO=true SONAR=publish
script: mvn clean verify sonar:sonar --fail-at-end
# Performance testing
- jdk: openjdk7
env: JACOCO=false
- jdk: openjdk8
env: JACOCO=false
- jdk: oraclejdk9
env: JACOCO=false
- jdk: oraclejdk11
env: JACOCO=false
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.11.3</version>
<version>1.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.11.3</version>
<version>1.16</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.20</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -207,7 +207,7 @@
<configuration>
<compilerArgs>
<arg>-Werror</arg>
<arg>-Xlint:all</arg>
<arg>-Xlint:all,-options,-processing</arg>
</compilerArgs>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.junit.Test;
import org.junit.rules.ExpectedException;

import javax.xml.bind.JAXBException;
import javax.naming.NamingException;
import java.util.UnknownFormatConversionException;

import static org.hamcrest.CoreMatchers.containsString;
Expand All @@ -32,7 +32,6 @@
* @author Krzysztof Suszyński <krzysztof.suszynski@wavesoftware.pl>
* @since 2015-10-07
*/
@SuppressWarnings("ConstantConditions")
public class EidRuntimeExceptionTest {

@Rule
Expand All @@ -42,19 +41,19 @@ public class EidRuntimeExceptionTest {
public void testGetMessage() {
// then
thrown.expect(EidRuntimeException.class);
thrown.expectCause(CoreMatchers.<Throwable>instanceOf(JAXBException.class));
thrown.expectCause(CoreMatchers.<Throwable>instanceOf(NamingException.class));
thrown.expectCause(hasMessage(is((String) null)));
thrown.expectMessage(containsString("20151007:212217"));
thrown.expectMessage(containsString("javax.xml.bind.JAXBException\n - " +
"with linked exception:\n" +
"[java.util.UnknownFormatConversionException: " +
"Conversion = Invalid for unit test]"));
thrown.expectMessage(containsString(
"javax.naming.NamingException [Root exception is java.util" +
".UnknownFormatConversionException: Conversion = Invalid for" +
" unit test]"
));

// given
String message = null;
Throwable original = new UnknownFormatConversionException("Invalid for unit test");
JAXBException cause = new JAXBException(message);
cause.setLinkedException(original);
NamingException cause = new NamingException(null);
cause.setRootCause(original);
throw new EidRuntimeException("20151007:212217", cause);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import javax.annotation.Nonnull;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.util.Locale;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -471,7 +472,7 @@ public void testCreate() throws NoSuchMethodException {
// given
Class<EidPreconditions> cls = EidPreconditions.class;
Constructor<?> constructor = cls.getDeclaredConstructor();
boolean access = constructor.isAccessible();
boolean access = Modifier.isPublic(constructor.getModifiers());

// then
assertThat(access).isFalse();
Expand Down
32 changes: 32 additions & 0 deletions src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018 Wave Software
~
~ Licensed 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.
-->
<configuration
xmlns="http://ch.qos.logback/xml/ns/logback"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ch.qos.logback/xml/ns/logback
https://raw.githubusercontent.com/enricopulatzo/logback-XSD/master/src/main/xsd/logback.xsd">

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%highlight(%-5level) %magenta(%d{HH:mm:ss.SSS}) %cyan(%logger{36}) - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
<logger name="pl.wavesoftware" level="debug" />
</configuration>
21 changes: 0 additions & 21 deletions src/test/resources/simplelogger.properties

This file was deleted.

0 comments on commit 6870579

Please sign in to comment.