Compare commits

...

No commits in common. "c8-beta-stream-2" and "c10s" have entirely different histories.

15 changed files with 178 additions and 44 deletions

View File

@ -1 +0,0 @@
6027c6014a49499e4b7b831bfb3df916d7192a3a SOURCES/disruptor-3.4.4.tar.gz

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

12
.gitignore vendored
View File

@ -1 +1,11 @@
SOURCES/disruptor-3.4.4.tar.gz
/3.2.1.tar.gz
/3.3.2.tar.gz
/disruptor-3.3.2.pom
/disruptor-3.3.4.pom
/3.3.4.tar.gz
/disruptor-3.3.6.tar.gz
/disruptor-3.3.6.pom
/disruptor-3.4.2.pom
/disruptor-3.4.2.tar.gz
/disruptor-3.4.4.tar.gz
/disruptor-3.4.4.pom

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.4.4</version>
<name>Disruptor Framework</name>
<description>Disruptor - Concurrent Programming Framework</description>
<url>http://lmax-exchange.github.com/disruptor</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>team</id>
<name>LMAX Disruptor Development Team</name>
<email>lmax-disruptor@googlegroups.com</email>
</developer>
</developers>
<scm>
<connection>scm:git@github.com:LMAX-Exchange/disruptor.git</connection>
<url>scm:git@github.com:LMAX-Exchange/disruptor.git</url>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

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,17 +1,24 @@
%bcond_with bootstrap
Name: disruptor
Version: 3.4.4
Release: 2%{?dist}
Release: 12%{?dist}
Summary: Concurrent Programming Framework
License: ASL 2.0
License: Apache-2.0
URL: https://lmax-exchange.github.io/disruptor/
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Source0: https://github.com/LMAX-Exchange/disruptor/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/com/lmax/%{name}/%{version}/%{name}-%{version}.pom
BuildRequires: maven-local-openjdk8
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
%endif
%description
A High Performance Inter-Thread Messaging Library.
@ -76,8 +83,39 @@ rm -r src/test/java/com/lmax/disruptor/dsl/DisruptorTest.java
%license LICENCE.txt
%changelog
* Wed Feb 23 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4.4-2
- Build with OpenJDK 8
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.4.4-12
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 3.4.4-11
- Bump release for Aug 2024 java mass rebuild
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.4.4-10
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Sep 01 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.4.4-7
- Convert License tag to SPDX format
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 3.4.4-3
- Rebuilt for java-17-openjdk as system jdk
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Dec 13 2021 Sérgio Basto <sergio@serjux.com> - 3.4.4-1
- Update disruptor to 3.4.4 (#1953941)

8
gating.yaml Normal file
View File

@ -0,0 +1,8 @@
--- !Policy
product_versions:
- rhel-10
decision_contexts:
- osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/smoke.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/javapackages.functional}

7
plans/javapackages.fmf Normal file
View File

@ -0,0 +1,7 @@
summary: Run javapackages-specific tests
discover:
how: fmf
url: https://src.fedoraproject.org/tests/javapackages
ref: c10s
execute:
how: tmt

5
plans/smoke.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (disruptor-3.4.4.tar.gz) = 871d474ecbc4e09d33b0d099232f2abdf88b755141e00406e4a721e5bd6c5edc99c6c446277e054bd603ae9b158bdb6b438aa6e8532194dca9bce953b748bfde
SHA512 (disruptor-3.4.4.pom) = 32c4ce4267c8dac44803949e68298fabfc399e1ff170a630b531aca2d87b8ec8fdb9a3f379005c512e94c9cfaa25f15bc421023d211c6c6d8ceb3eee1b61ce0d

View File

@ -0,0 +1,51 @@
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.EventFactory;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.util.DaemonThreadFactory;
import java.nio.ByteBuffer;
class LongEvent
{
private long value;
public void set(long value)
{
this.value = value;
}
}
class LongEventFactory implements EventFactory<LongEvent>
{
public LongEvent newInstance()
{
return new LongEvent();
}
}
public class Smoke
{
public static void main(String[] args) throws Exception
{
System.out.println("SMOKE TEST START");
int bufferSize = 1024;
Disruptor<LongEvent> disruptor =
new Disruptor<>(LongEvent::new, bufferSize, DaemonThreadFactory.INSTANCE);
disruptor.handleEventsWith((event, sequence, endOfBatch) ->
System.out.println("Event: " + event));
disruptor.start();
RingBuffer<LongEvent> ringBuffer = disruptor.getRingBuffer();
ByteBuffer bb = ByteBuffer.allocate(8);
for (long l = 0; l < 10; l++)
{
bb.putLong(0, l);
ringBuffer.publishEvent((event, sequence, buffer) -> event.set(buffer.getLong(0)), bb);
Thread.sleep(100);
}
System.out.println("SMOKE TEST COMPLETE");
}
}

View File

@ -0,0 +1,6 @@
summary: disruptor smoke test
description: |
Test basic functionality of disruptor.
require:
- disruptor
- java-21-openjdk-devel

18
tests/Sanity/smoke/runtest.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
. /usr/share/beakerlib/beakerlib.sh
rlJournalStart
rlPhaseStartTest "log events"
rlAssertRpm disruptor
java_home=/usr/lib/jvm/java-21-openjdk/bin
jar=/usr/share/java/disruptor.jar
rlRun "${java_home}/javac -cp ${jar} -d bin Smoke.java"
rlRun -s "${java_home}/java -cp ${jar}:bin Smoke"
rlAssertGrep "Event: LongEvent" $rlRun_LOG
rlAssertGrep "SMOKE TEST COMPLETE" $rlRun_LOG
rlPhaseEnd
rlJournalEnd
rlJournalPrintText

4
tests/main.fmf Normal file
View File

@ -0,0 +1,4 @@
contact: Mikolaj Izdebski <mizdebsk@redhat.com>
framework: beakerlib
test: ./runtest.sh
tier: 0