Skip to content

Commit

Permalink
Dev UI: Change log stream test to use less common logger
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com>
(cherry picked from commit 5eb1383)
  • Loading branch information
phillip-kruger authored and gsmet committed Aug 10, 2023
1 parent b48be6c commit 45dd9e7
Showing 1 changed file with 10 additions and 2 deletions.
Expand Up @@ -40,16 +40,24 @@ public void testGetLoggers() throws Exception {
@Test
public void testUpdateLoggers() throws Exception {
// Get the level before
JsonNode getLoggerResponse = super.executeJsonRPCMethod("getLogger", Map.of("loggerName", "io.quarkus"));
JsonNode getLoggerResponse = super.executeJsonRPCMethod("getLogger",
Map.of("loggerName", "io.quarkus.devui.runtime.DevUIWebSocket"));
Assertions.assertNotNull(getLoggerResponse);
Assertions.assertEquals("INFO", getLoggerResponse.get("effectiveLevel").asText());

// Update the level
JsonNode updateLogLevelResponse = super.executeJsonRPCMethod("updateLogLevel",
Map.of("loggerName", "io.quarkus",
Map.of("loggerName", "io.quarkus.devui.runtime.DevUIWebSocket",
"levelValue", "DEBUG"));
Assertions.assertNotNull(updateLogLevelResponse);
Assertions.assertEquals("DEBUG", updateLogLevelResponse.get("effectiveLevel").asText());

// Restore the level
JsonNode restoreLogLevelResponse = super.executeJsonRPCMethod("updateLogLevel",
Map.of("loggerName", "io.quarkus.devui.runtime.DevUIWebSocket",
"levelValue", "INFO"));
Assertions.assertNotNull(restoreLogLevelResponse);
Assertions.assertEquals("INFO", restoreLogLevelResponse.get("effectiveLevel").asText());
}

private boolean hasStartedLine(Iterator<JsonNode> elements) {
Expand Down

0 comments on commit 45dd9e7

Please sign in to comment.