Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make control message smaller, so to not break ARM tests #2044

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,19 @@ public void logBigMessage() {
@Test
@Tag("https://issues.redhat.com/browse/QUARKUS-4531")
public void filterBigMessage() {
String shorterMessage = "You won't believe it, but this message is exactly 64 chars long!";
String longerMessage = shorterMessage.repeat(2);
Assertions.assertEquals(64, shorterMessage.getBytes(StandardCharsets.UTF_8).length);
String longerMessage = "You won't believe it, but this message is exactly 64 chars long!".repeat(2);
String control = "control";
Assertions.assertEquals(LENGTH_LIMIT, longerMessage.getBytes(StandardCharsets.UTF_8).length);

// the order below is important. We must make sure, that the shorter message is sent after the longer
app.given().when()
.post("/log/static/info?message={message}",
longerMessage)
.post("/log/static/info?message={message}", longerMessage)
.then().statusCode(204);
app.given().when()
.post("/log/static/info?message={message}",
shorterMessage)
.post("/log/static/info?message={message}", control)
.then().statusCode(204);

syslog.logs().assertContains(shorterMessage);
syslog.logs().assertContains(control);
syslog.getLogs()
.forEach(line -> {
Assertions.assertFalse(line.contains(longerMessage));
Expand Down