Skip to content

Commit

Permalink
Making test more stable - it can happen that there is some other unre…
Browse files Browse the repository at this point in the history
…lated log line (e.g. from [Finalizer] thread) so we can't assume there is exactly ONE result.
  • Loading branch information
tkowalcz committed Jul 17, 2021
1 parent 9a07bcf commit 9d2f810
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.greaterThan;

@Testcontainers
public class ProgrammaticConfigurationTest {
Expand Down Expand Up @@ -79,7 +80,7 @@ void shouldInitializeAppenderProgrammatically() throws Exception {
.body("status", equalTo("success"))
.body("data.result.size()", equalTo(1))
.body("data.result[0].stream.server", equalTo("127.0.0.1"))
.body("data.result[0].values.size()", equalTo(1))
.body("data.result[0].values.size()", greaterThan(0))
.body(
"data.result.values",
hasItems(
Expand Down Expand Up @@ -113,14 +114,15 @@ private ConfigurationBuilder<BuiltConfiguration> createConfiguration() {
.addAttribute("level", "ALL")
)
.add(
builder.newLayout("PatternLayout").
addAttribute("pattern", "%X{tid} [%t] %d{MM-dd HH:mm:ss.SSS} %5p %c{1} - %m%n%exception{full}")
builder.newLayout("PatternLayout")
.addAttribute("pattern", "%X{tid} [%t] %d{MM-dd HH:mm:ss.SSS} %5p %c{1} - %m%n%exception{full}")
)
.addComponent(
builder.newComponent("Header")
.addAttribute("name", "server")
.addAttribute("value", "127.0.0.1")
).addComponent(
)
.addComponent(
builder.newComponent("Label")
.addAttribute("name", "server")
.addAttribute("value", "127.0.0.1")
Expand Down

0 comments on commit 9d2f810

Please sign in to comment.