From afb3ab871b0f71e2e8bb0cfa29393c4fef14f333 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: May 05 2016 10:01:07 +0000 Subject: Try to eliminate test nondeterminism --- diff --git a/0001-Try-to-eliminate-test-nondeterminism.patch b/0001-Try-to-eliminate-test-nondeterminism.patch new file mode 100644 index 0000000..a0e5e96 --- /dev/null +++ b/0001-Try-to-eliminate-test-nondeterminism.patch @@ -0,0 +1,55 @@ +From 4add322f766b7ef27946f0a11760a51f3d5af100 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Thu, 5 May 2016 11:56:47 +0200 +Subject: [PATCH] Try to eliminate test nondeterminism + +--- + src/test/java/jline/TerminalFactoryTest.java | 26 +++++++++++++++++--------- + 1 file changed, 17 insertions(+), 9 deletions(-) + +diff --git a/src/test/java/jline/TerminalFactoryTest.java b/src/test/java/jline/TerminalFactoryTest.java +index c9bbc4d..ba29f3f 100644 +--- a/src/test/java/jline/TerminalFactoryTest.java ++++ b/src/test/java/jline/TerminalFactoryTest.java +@@ -81,10 +81,14 @@ public class TerminalFactoryTest + expect(System.getenv("OSV_CPUS")).andReturn(null); + replayAll(); + +- Terminal t = TerminalFactory.get(); +- verifyAll(); +- assertNotNull(t); +- assertEquals(expectedTerminalClassName, t.getClass().getName()); ++ try { ++ Terminal t = TerminalFactory.get(); ++ verifyAll(); ++ assertNotNull(t); ++ assertEquals(expectedTerminalClassName, t.getClass().getName()); ++ } finally { ++ System.clearProperty(TerminalFactory.JLINE_TERMINAL); ++ } + } + + @Test +@@ -96,9 +100,13 @@ public class TerminalFactoryTest + expect(System.getenv("INSIDE_EMACS")).andReturn(null); + replayAll(); + +- Terminal t = TerminalFactory.get(); +- verifyAll(); +- assertNotNull(t); +- assertEquals(UnsupportedTerminal.class.getName(), t.getClass().getName()); ++ try { ++ Terminal t = TerminalFactory.get(); ++ verifyAll(); ++ assertNotNull(t); ++ assertEquals(UnsupportedTerminal.class.getName(), t.getClass().getName()); ++ } finally { ++ System.clearProperty(TerminalFactory.JLINE_TERMINAL); ++ } + } +-} +\ No newline at end of file ++} +-- +2.5.5 + diff --git a/jline.spec b/jline.spec index 47115c3..f8963b6 100644 --- a/jline.spec +++ b/jline.spec @@ -1,6 +1,6 @@ Name: jline Version: 2.13 -Release: 3%{?dist} +Release: 4%{?dist} Summary: JLine is a Java library for handling console input License: BSD and ASL 2.0 URL: https://github.com/jline/jline2 @@ -9,6 +9,8 @@ URL: https://github.com/jline/jline2 # cd jline2/ && git archive --format=tar --prefix=jline-2.13/ jline-2.13 | xz > jline-2.13.tar.xz Source0: jline-%{version}.tar.xz +Patch1: 0001-Try-to-eliminate-test-nondeterminism.patch + BuildArch: noarch BuildRequires: jpackage-utils @@ -42,6 +44,8 @@ This package contains the API documentation for %{name}. %prep %setup -q -n jline-%{version} +%patch1 -p1 + # Remove maven-shade-plugin usage %pom_remove_plugin "org.apache.maven.plugins:maven-shade-plugin" # Remove animal sniffer plugin in order to reduce deps @@ -71,11 +75,13 @@ mkdir -p target/generated-test-sources/test-annotations %files -f .mfiles %dir %{_javadir}/jline -%dir %{_mavenpomdir}/jline %files javadoc -f .mfiles-javadoc %changelog +* Thu May 05 2016 Michael Simacek - 2.13-4 +- Try to eliminate test nondeterminism + * Mon Mar 14 2016 Severin Gehwolf - 2.13-3 - OSGi export jline.internal. Resolves RHBZ#1317551.