Onboard package into gating

This commit is contained in:
Mikolaj Izdebski 2022-04-26 21:02:53 +02:00
parent 9a42b6bf56
commit c21c2555d6
4 changed files with 68 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

8
gating.yaml Normal file
View File

@ -0,0 +1,8 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_testing
- bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

51
plans/Smoke.java Normal file
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");
}
}

8
plans/smoke.fmf Normal file
View File

@ -0,0 +1,8 @@
summary: Basic smoke test
prepare:
how: install
package: java-1.8.0-openjdk-devel
execute:
script:
- /usr/lib/jvm/java-1.8.0-openjdk/bin/javac -cp /usr/share/java/disruptor.jar plans/Smoke.java
- /usr/lib/jvm/java-1.8.0-openjdk/bin/java -cp /usr/share/java/disruptor.jar:plans Smoke