Looper: draft requirements on logic for triggering the builder
This commit is contained in:
parent
b873f7025b
commit
746866f5fc
2 changed files with 165 additions and 0 deletions
|
|
@ -287,6 +287,148 @@ namespace test {
|
|||
verifyBuidlerStart()
|
||||
{
|
||||
UNIMPLEMENTED("verify the logic when builder gets triggered");
|
||||
Setup setup;
|
||||
Looper looper = setup.install();
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild());
|
||||
CHECK ( looper.isIdle());
|
||||
|
||||
setup.has_commands_in_queue = true; // regular command processing
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK ( looper.isWorking());
|
||||
CHECK ( looper.needBuild());
|
||||
CHECK (not looper.isIdle());
|
||||
|
||||
setup.has_commands_in_queue = false; // done with the commands thus far
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK ( looper.needBuild()); // ...note: still needs build
|
||||
CHECK ( looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is the short timeout
|
||||
|
||||
///////////////////////////////TODO how to communicate build dirty state?? // set NOT DIRTY
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: now done with building
|
||||
CHECK ( looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is now the *extended* timeout
|
||||
|
||||
setup.has_commands_in_queue = true; // next command pending
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK ( looper.isWorking());
|
||||
CHECK ( looper.needBuild());
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is back to the short period
|
||||
|
||||
looper.enableProcessing(false); // disable processing
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK ( looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: dirty state hidden by disabled state
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is *completely disabled*
|
||||
|
||||
looper.enableProcessing(true); // enable back
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK ( looper.isWorking());
|
||||
CHECK ( looper.needBuild()); // ...note: dirty state revealed again
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is back to the short period
|
||||
|
||||
setup.has_commands_in_queue = false; // done with the commands
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK ( looper.needBuild()); // ...note: still needs build
|
||||
CHECK ( looper.isIdle());
|
||||
|
||||
looper.enableProcessing(false); // disable processing
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK ( looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: dirty state hidden
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is *completely disabled*
|
||||
|
||||
looper.enableProcessing(true); // enable back
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK ( looper.needBuild()); // ...note: dirty state revealed
|
||||
CHECK ( looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is back to the short period
|
||||
|
||||
looper.enableProcessing(false); // disable processing
|
||||
///////////////////////////////TODO how to communicate build dirty state?? // set NOT DIRTY
|
||||
// let's assume builder was running and is now finished
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK ( looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: dirty state not obvious
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is *completely disabled*
|
||||
|
||||
looper.enableProcessing(true); // enable back
|
||||
|
||||
CHECK (not looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: but now it becomes clear builder is not dirty
|
||||
CHECK ( looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout is now the *extended* timeout
|
||||
|
||||
setup.has_commands_in_queue = true; // more commands again
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK ( looper.isWorking());
|
||||
CHECK ( looper.needBuild());
|
||||
CHECK (not looper.isIdle());
|
||||
|
||||
looper.triggerShutdown(); // request shutdown...
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: no need to care for builder anymore
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout *remains* at the short period (due to shutdown)
|
||||
|
||||
setup.has_commands_in_queue = false; // and even when done all commands
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild()); // ...note: still no need for builder run, since in shutdown
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout *remains* at the short period (due to shutdown)
|
||||
|
||||
///////////////////////////////TODO how to communicate build dirty state?? // set NOT DIRTY
|
||||
|
||||
CHECK ( looper.requireAction());
|
||||
CHECK (not looper.isDisabled());
|
||||
CHECK (not looper.isWorking());
|
||||
CHECK (not looper.needBuild());
|
||||
CHECK (not looper.isIdle());
|
||||
///////////////////////////////TODO verify the timeout *remains* at the short period (due to shutdown)
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -294,6 +436,10 @@ namespace test {
|
|||
verifyCheckpoint()
|
||||
{
|
||||
UNIMPLEMENTED("verify the semantics of reaching a checkpoint");
|
||||
//////////////////////////TODO a checkpoint is reached when no state change is pending
|
||||
//////////////////////////TODO It is not clear how this relates to triggering the Builder,
|
||||
//////////////////////////TODO since the initial idea was to trigger the Builder at checkpoints,
|
||||
/// but now it looks like we don't need this distinction anymore
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11192,6 +11192,25 @@
|
|||
<node CREATED="1481828498618" ID="ID_321199314" MODIFIED="1481828519539" TEXT="nach neuem Command, mit kleiner Verzögerung"/>
|
||||
<node CREATED="1481828520176" ID="ID_239973202" MODIFIED="1481828532570" TEXT="bei voller Schlange mit Toleranzschwelle"/>
|
||||
<node CREATED="1481828568129" ID="ID_295162940" MODIFIED="1481828574412" TEXT="Builder-Lauf ist monolithisch"/>
|
||||
<node CREATED="1481928858318" ID="ID_1695005029" MODIFIED="1481928863793" TEXT="verdecken...">
|
||||
<node CREATED="1481928864549" ID="ID_515765693" MODIFIED="1481928867281" TEXT="wenn gesperrt"/>
|
||||
<node CREATED="1481928867893" ID="ID_1200076817" MODIFIED="1481928871448" TEXT="wenn in Shutdown"/>
|
||||
</node>
|
||||
<node CREATED="1481928874500" ID="ID_73724471" MODIFIED="1481928881567" TEXT="idle-timeout">
|
||||
<node CREATED="1481928882723" ID="ID_770033134" MODIFIED="1481928885951" TEXT="dynamisch steuern"/>
|
||||
<node CREATED="1481928888035" ID="ID_927205346" MODIFIED="1481928912699" TEXT="kurz, wenn der Builder laufen muß"/>
|
||||
<node CREATED="1481928913687" ID="ID_696704157" MODIFIED="1481928937432" TEXT="lang sonst"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1481928939300" ID="ID_1625916543" MODIFIED="1481928952211" TEXT="kein Timeout wenn gesperrt">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1481928958233" ID="ID_350657817" MODIFIED="1481929002980" TEXT="Builder-Lauf erzwingen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1481928966167" ID="ID_1511723472" MODIFIED="1481928974435" TEXT="wenn lange Timeout-Spanne überschritten"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1481928978223" ID="ID_106761868" MODIFIED="1481928996349" TEXT="implementierung erforder Zeitmessung">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1481828583551" ID="ID_436508747" MODIFIED="1481828608672" TEXT="Aufbau">
|
||||
<node CREATED="1481828611347" ID="ID_160907866" MODIFIED="1481828614071" TEXT="Front-End"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue