Skip to content

Commit

Permalink
restart build
Browse files Browse the repository at this point in the history
  • Loading branch information
rainer-prosi committed Nov 12, 2024
1 parent 843b2d2 commit 1798743
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/test/java/org/cip4/bambi/core/AbstractDeviceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.cip4.bambi.BambiTestDevice;
import org.cip4.bambi.core.IDeviceProperties.EWatchFormat;
import org.cip4.bambi.core.queues.QueueEntry;
import org.cip4.bambi.core.queues.QueueProcessor;
import org.cip4.jdflib.auto.JDFAutoQueueEntry.EnumQueueEntryStatus;
import org.cip4.jdflib.core.AttributeName;
import org.cip4.jdflib.core.ElementName;
Expand Down Expand Up @@ -259,9 +260,10 @@ public void testDoSynchMulti() throws Exception
final BambiTestDevice device = Mockito.spy(new BambiTestDevice());
device.setSynchronous(true);
when(device.getParallelSynch()).thenReturn(4);
QueueProcessor queueProcessor = device.getQueueProcessor();
for (int i = 0; i < 42; i++)
{
final JDFQueueEntry qe = device.getQueueProcessor().getQueue().appendQueueEntry();
final JDFQueueEntry qe = queueProcessor.getQueue().appendQueueEntry();
qe.setQueueEntryID("qe" + i);
qe.setQueueEntryStatus(EnumQueueEntryStatus.Waiting);
final JDFNode root = JDFNode.createRoot();
Expand All @@ -271,13 +273,13 @@ public void testDoSynchMulti() throws Exception
}
for (int i = 0; i < 1234; i++)
{
if (device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Waiting) > 0)
if (queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Waiting) > 0)
{
ThreadUtil.sleep(123);
}
}
assertEquals(0, device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Waiting));
assertNotEquals(0, device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Completed));
assertEquals(0, queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Waiting));
assertNotEquals(0, queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Completed));
}

/**
Expand All @@ -289,9 +291,10 @@ public void testDoAsynchMulti() throws Exception
final BambiTestDevice device = Mockito.spy(new BambiTestDevice());
device.setSynchronous(false);
when(device.getParallelSynch()).thenReturn(4);
QueueProcessor queueProcessor = device.getQueueProcessor();
for (int i = 0; i < 42; i++)
{
final JDFQueueEntry qe = device.getQueueProcessor().getQueue().appendQueueEntry();
final JDFQueueEntry qe = queueProcessor.getQueue().appendQueueEntry();
qe.setQueueEntryID("qe" + i);
qe.setQueueEntryStatus(EnumQueueEntryStatus.Waiting);
final JDFNode root = JDFNode.createRoot();
Expand All @@ -301,13 +304,13 @@ public void testDoAsynchMulti() throws Exception
}
for (int i = 0; i < 1234; i++)
{
if (device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Waiting) > 0)
if (queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Waiting) > 0)
{
ThreadUtil.sleep(123);
}
}
assertEquals(0, device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Waiting));
assertNotEquals(0, device.getQueueProcessor().getQueue().numEntries(EnumQueueEntryStatus.Completed));
assertEquals(0, queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Waiting));
assertNotEquals(0, queueProcessor.getQueue().numEntries(EnumQueueEntryStatus.Completed));
}

/**
Expand Down

0 comments on commit 1798743

Please sign in to comment.