Skip to content

Commit

Permalink
Merge pull request #112 from olibye/jdk-9-10-11-with-JAX-WS
Browse files Browse the repository at this point in the history
Jdk 9 10 with JAX-WS. Jdk 11 still failing.
  • Loading branch information
olibye committed Sep 23, 2018
2 parents 498d09a + 79d8e2a commit f319209
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 29 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
@@ -1,6 +1,13 @@
language: java

jdk:
# net.sf.cglib.core.DuplicatesPredicate$UnnecessaryBridgeFinder does not like org.objectweb.asm.ClassReader nestMembersOffset > 0 for JDK11 classes
# - openjdk-ea
# - openjdk11
# - oraclejdk11
- openjdk10
- oraclejdk10
- openjdk9
- oraclejdk8
- openjdk7 #oracle not supported anymore
# openjdk6 not supported any more
Expand Down
Expand Up @@ -41,10 +41,10 @@
assert the expectations after each test has run.</p>

<pre>public class ATestWithSatisfiedExpectations {
@Rule public final JMockContext context = new JMockContext();
\@Rule public final JMockContext context = new JMockContext();
private final Runnable runnable = context.mock(Runnable.class);

@Test
\@Test
public void doesSatisfyExpectations() {
context.checking(new Expectations() {{
oneOf (runnable).run();
Expand Down
@@ -1,15 +1,20 @@
package org.jmock.test.acceptance;

import org.jmock.Mockery;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.*;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.junit.Assert.assertThat;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.lang.ref.WeakReference;

import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.junit.Assert.assertThat;
import org.jmock.Mockery;
import org.jmock.lib.concurrent.Synchroniser;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

/**
* Nasty test to show GitHub #36 is fixed.
Expand All @@ -18,7 +23,9 @@ public class MockeryFinalizationAcceptanceTests
{
private static final int FINALIZE_COUNT = 10; // consistently shows a problem before GitHub #36 was fixed

private final Mockery mockery = new Mockery();
private final Mockery mockery = new Mockery() {{
setThreadingPolicy(new Synchroniser());
}};
private final ErrorStream capturingErr = new ErrorStream();

@BeforeClass
Expand Down
8 changes: 7 additions & 1 deletion jmock/pom.xml
Expand Up @@ -43,6 +43,12 @@
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -122,4 +128,4 @@
</pluginManagement>
</build>

</project>
</project>
Expand Up @@ -37,7 +37,6 @@ private void reportError(String error) {
throw new ConcurrentModificationException(error);
}

@Override
public InvocationDispatcher dispatcher() {
return new UnsynchronisedInvocationDispatcher();
}
Expand Down
Expand Up @@ -106,7 +106,6 @@ private Object synchroniseInvocation(Invokable mockObject, Invocation invocation
}
}

@Override
public InvocationDispatcher dispatcher() {
return invocationDispatcher;
}
Expand Down
Expand Up @@ -29,7 +29,6 @@ public UnsynchronisedInvocationDispatcher(Collection<Expectation> theExpectation
/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#newStateMachine(java.lang.String)
*/
@Override
public StateMachine newStateMachine(String name) {
StateMachine stateMachine = new StateMachine(name);
stateMachines.add(stateMachine);
Expand All @@ -39,23 +38,20 @@ public StateMachine newStateMachine(String name) {
/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#add(org.jmock.api.Expectation)
*/
@Override
public void add(Expectation expectation) {
expectations.add(expectation);
}

/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#describeTo(org.hamcrest.Description)
*/
@Override
public void describeTo(Description description) {
describe(description, expectations);
}

/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#describeMismatch(org.jmock.api.Invocation, org.hamcrest.Description)
*/
@Override
public void describeMismatch(Invocation invocation, Description description) {
describe(description, describedWith(expectations, invocation));
}
Expand Down Expand Up @@ -101,7 +97,6 @@ private void describe(Description description, Iterable<? extends SelfDescribing
/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#isSatisfied()
*/
@Override
public boolean isSatisfied() {
for (Expectation expectation : expectations) {
if (!expectation.isSatisfied()) {
Expand All @@ -114,7 +109,6 @@ public boolean isSatisfied() {
/* (non-Javadoc)
* @see org.jmock.internal.InvocationDispatcher#dispatch(org.jmock.api.Invocation)
*/
@Override
public Object dispatch(Invocation invocation) throws Throwable {
for (Expectation expectation : expectations) {
if (expectation.matches(invocation)) {
Expand Down
43 changes: 31 additions & 12 deletions pom.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -48,9 +49,9 @@
<hamcrest.version>1.3</hamcrest.version>
<hamcrest.src>hamcrest-src</hamcrest.src>
<junit.version>4.12</junit.version>
<cglib.version>3.2.0</cglib.version>
<asm.version>5.0.4</asm.version>
<objenesis.version>2.1</objenesis.version>
<cglib.version>3.2.8</cglib.version>
<asm.version>6.2.1</asm.version>
<objenesis.version>2.6</objenesis.version>
<bsh.version>2.0b6</bsh.version>
</properties>

Expand All @@ -70,7 +71,6 @@
<!-- Annoying if the packager has to fix the java doc -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>check-javadoc</id>
Expand All @@ -86,7 +86,7 @@
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<version>1.6.5</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand Down Expand Up @@ -129,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18</version>
<version>2.20.1</version>
<configuration>
<!-- acceptance tests allow failures -->
<testFailureIgnore>true</testFailureIgnore>
Expand All @@ -143,7 +143,29 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.3.2</version>
<version>1.4</version>
</plugin>

<plugin>
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>

<plugin>
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
</plugin>

<plugin>
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<!-- Annoying if the packager has to fix the java doc -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
</plugin>

</plugins>
Expand Down Expand Up @@ -193,7 +215,7 @@
<dependency>
<groupId>com.thoughtworks.qdox</groupId>
<artifactId>qdox</artifactId>
<version>1.12.1</version>
<version>2.0-M9</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -238,7 +260,6 @@
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<useAgent>true</useAgent>
<keyname>${gpg.keyname}</keyname>
Expand All @@ -258,7 +279,6 @@
<!-- http://central.sonatype.org/pages/apache-maven.html -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -275,7 +295,6 @@
doc -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down

0 comments on commit f319209

Please sign in to comment.