gil pushed to disruptor (master). "build fix for jmock 2.8.1"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Jun 3 14:39:19 UTC 2015


From 0bef52fb04d4542fade03db42414cb224348cbd5 Mon Sep 17 00:00:00 2001
From: gil <puntogil at libero.it>
Date: Wed, 3 Jun 2015 16:14:55 +0200
Subject: build fix for jmock 2.8.1


diff --git a/disruptor-3.3.2-jmock.patch b/disruptor-3.3.2-jmock.patch
new file mode 100644
index 0000000..2f4797e
--- /dev/null
+++ b/disruptor-3.3.2-jmock.patch
@@ -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);
+ 
diff --git a/disruptor.spec b/disruptor.spec
index 8198840..41359a9 100644
--- a/disruptor.spec
+++ b/disruptor.spec
@@ -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 at 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 at libero.it> 3.3.2-2
+- build fix for jmock 2.8.1
+
 * Wed Jun  3 2015 Mikolaj Izdebski <mizdebsk at redhat.com> - 3.3.2-1
 - Update to upstream version 3.3.2
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/disruptor.git/commit/?h=master&id=0bef52fb04d4542fade03db42414cb224348cbd5


More information about the scm-commits mailing list