mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 01:34:04 +00:00
Keep warnings visible past the once-key cap
This commit is contained in:
1 parent
00b0509219
commit
a5918c17a7
2 files changed
+27
-7
No files matched your search
@@ -166,6 +166,23 @@ public class IrisLoggingTest {
|
||||
assertFalse(IrisLogging.warnOnce(key, "claimed"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void aKeyPastTheCapIsStillStatedWhileClaimedKeysStayQuiet() {
|
||||
String claimed = uniqueKey();
|
||||
assertTrue(IrisLogging.warnOnce(claimed, "claimed"));
|
||||
for (int filler = 1; filler < IrisLogging.MAX_ONCE_KEYS; filler++) {
|
||||
IrisLogging.warnOnce(uniqueKey(), "filler");
|
||||
}
|
||||
String unclaimable = uniqueKey();
|
||||
levels.clear();
|
||||
|
||||
assertTrue(IrisLogging.warnOnce(unclaimable, "new condition"));
|
||||
assertTrue(IrisLogging.warnOnce(unclaimable, "new condition"));
|
||||
assertFalse(IrisLogging.warnOnce(claimed, "claimed"));
|
||||
|
||||
assertEquals(List.of(LogLevel.WARN, LogLevel.WARN, LogLevel.DEBUG), levels);
|
||||
}
|
||||
|
||||
private void bindCapturingPlatform() {
|
||||
IrisPlatform platform = mock(IrisPlatform.class);
|
||||
capturingPlatform = platform;
|
||||
|
||||
Reference in new issue
Block a user