@@ -118,9 +118,12 @@ tcpConnect[port_, o_LocalKernelObject] := With[{shared = af`SharedDir, host = o[
118
118
EventFire [Internal ` Kernel ` Stdout [secret ], "Pong" , True ];
119
119
);
120
120
121
- Internal ` Kernel ` Watchdog ["Assertion" , name_ String , test_ , action_ ] := (
121
+ Internal ` Kernel ` Watchdog ["Assertion" , name_ String , test_ , action_ ] := With [{uid = CreateUUID []},
122
+ Internal ` Kernel ` Watchdog ["Assertion" , name , test , action , uid ];
123
+ ];
124
+ Internal ` Kernel ` Watchdog ["Assertion" , name_ String , test_ , action_ , tag_ ] := (
122
125
If [! KeyExistsQ [Internal ` Kernel ` Watchdog ` store , name ],
123
- Internal ` Kernel ` Watchdog ` store [name ] = {Hold [test ], Hold [action ]};
126
+ Internal ` Kernel ` Watchdog ` store [name ] = {Hold [test ], Hold [action ], tag };
124
127
Internal ` Kernel ` Watchdog ` state [name ] = ReleaseHold [test ];
125
128
];
126
129
);
@@ -129,14 +132,19 @@ tcpConnect[port_, o_LocalKernelObject] := With[{shared = af`SharedDir, host = o[
129
132
130
133
Internal ` Kernel ` Watchdog ` $Journal = {};
131
134
132
- Internal ` Kernel ` Watchdog ["Test" ] := With [{ },
135
+ Internal ` Kernel ` Watchdog ["Test" ] := Module [{ firedTags },
133
136
KeyValueMap [Function [{key , value },
134
137
If [Internal ` Kernel ` Watchdog ` state [key ] =!= ReleaseHold [value [[1 ]]],
135
138
Internal ` Kernel ` Watchdog ` $Journal = Append [Internal ` Kernel ` Watchdog ` $Journal , {StringTemplate [Internal ` Kernel ` Watchdog ::assert ][key ], Now } ];
136
- value [[2 ]] // ReleaseHold ;
139
+
140
+ If [! TrueQ [firedTags [value [[3 ]] ] ], value [[2 ]] // ReleaseHold ];
141
+ With [{v = value [[3 ]]}, firedTags [v ] = True ];
142
+
137
143
Internal ` Kernel ` Watchdog ` state [key ] = ReleaseHold [value [[1 ]]];
138
144
];
139
145
], Internal ` Kernel ` Watchdog ` store ];
146
+
147
+ ClearAll [firedTags ];
140
148
];
141
149
142
150
Internal ` Kernel ` Watchdog ["QuickTest" ] := Internal ` Kernel ` Watchdog ["Test" ];
0 commit comments