build fix for jmock 2.8.1

This commit is contained in:
gil 2015-06-03 16:14:55 +02:00
parent 1030ba0114
commit 0bef52fb04
2 changed files with 30 additions and 2 deletions

View File

@ -0,0 +1,21 @@
--- disruptor-3.3.2/src/test/java/com/lmax/disruptor/BatchEventProcessorTest.java 2015-02-25 10:09:57.000000000 +0100
+++ disruptor-3.3.2/src/test/java/com/lmax/disruptor/BatchEventProcessorTest.java.jmock 2015-06-03 15:52:43.997446568 +0200
@@ -23,6 +23,7 @@
import org.jmock.api.Action;
import org.jmock.api.Invocation;
import org.jmock.integration.junit4.JMock;
+import org.jmock.lib.concurrent.Synchroniser;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -35,7 +36,9 @@
@RunWith(JMock.class)
public final class BatchEventProcessorTest
{
- private final Mockery context = new Mockery();
+ private final Mockery context = new Mockery() {{
+ setThreadingPolicy(new Synchroniser());
+ }};
private final Sequence lifecycleSequence = context.sequence("lifecycleSequence");
private final CountDownLatch latch = new CountDownLatch(1);

View File

@ -1,11 +1,13 @@
Name: disruptor
Version: 3.3.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Concurrent Programming Framework
License: ASL 2.0
URL: http://lmax-exchange.github.io/disruptor/
Source0: https://github.com/LMAX-Exchange/disruptor/archive/%{version}.tar.gz
Source1: http://repo1.maven.org/maven2/com/lmax/%{name}/%{version}/%{name}-%{version}.pom
# see http://www.jmock.org/threading-synchroniser.html
Patch0: disruptor-3.3.2-jmock.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
@ -37,6 +39,8 @@ This package contains javadoc for %{name}.
find . -name "*.class" -print -delete
find . -name "*.jar" -type f -print -delete
%patch0 -p1
cp -p %{SOURCE1} pom.xml
# Add OSGi support
@ -66,7 +70,7 @@ rm -r src/test/java/com/lmax/disruptor/RingBufferTest.java \
# Failed to stop thread: Thread[com.lmax.disruptor.BatchEventProcessor@1d057a39,5,main]
rm -r src/test/java/com/lmax/disruptor/dsl/DisruptorTest.java
# Test fails due to incompatible jmock version
rm -f src/test/java/com/lmax/disruptor/EventPollerTest.java
#rm -f src/test/java/com/lmax/disruptor/EventPollerTest.java
%mvn_file :%{name} %{name}
@ -85,6 +89,9 @@ rm -f src/test/java/com/lmax/disruptor/EventPollerTest.java
%license LICENCE.txt
%changelog
* Wed Jun 03 2015 gil cattaneo <puntogil@libero.it> 3.3.2-2
- build fix for jmock 2.8.1
* Wed Jun 3 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.3.2-1
- Update to upstream version 3.3.2