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

Fixes #24520: Async tests are failing for node certificates #5486

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import org.junit.runner.RunWith
import org.slf4j.LoggerFactory
import org.specs2.mutable.Specification
import org.specs2.runner.JUnitRunner
import zio._

@RunWith(classOf[JUnitRunner])
class TestWriteNodeCertificatesPem extends Specification {
Expand Down Expand Up @@ -181,11 +182,10 @@ class TestWriteNodeCertificatesPem extends Specification {
// exec
writer.writeCerticatesAsync(dest, nodes)

Thread.sleep(100)

val output = new String(os.toByteArray, StandardCharsets.UTF_8)

(output must beMatching("""(?s).*Unexpected: Error when executing reload command.*code: -2147483648.*""".r)) and
(dest.contentAsString(StandardCharsets.UTF_8) must beEqualTo(cert1 + "\n" + cert2 + "\n"))
(new String(os.toByteArray, StandardCharsets.UTF_8) must beMatching(
"""(?s).*Unexpected: Error when executing reload command.*code: -2147483648.*""".r
)
.eventually(10, 100.millis.asScala)) and
(dest.contentAsString(StandardCharsets.UTF_8) must beEqualTo(cert1 + "\n" + cert2 + "\n").eventually(10, 100.millis.asScala))
}
}