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

W-11730386: Flaky test: org.mule.runtime.test.integration.logging.Log… #2608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -16,9 +16,12 @@

import static org.hamcrest.CoreMatchers.containsString;

import org.junit.runner.RunWith;
import org.mule.runtime.api.exception.MuleException;
import org.mule.runtime.module.deployment.impl.internal.builder.ApplicationFileBuilder;
import org.mule.runtime.module.deployment.impl.internal.builder.JarFileBuilder;
import org.mule.tck.junit4.FlakinessDetectorTestRunner;
import org.mule.tck.junit4.FlakyTest;
import org.mule.tck.util.CompilerUtils;
import org.mule.test.infrastructure.deployment.AbstractFakeMuleServerTestCase;

Expand All @@ -39,6 +42,7 @@

@Features({@Feature(INTEGRATIONS_TESTS), @Feature(LOGGING)})
@Story(LOGGING_LIBS_SUPPORT)
@RunWith(FlakinessDetectorTestRunner.class)
public class LoggingLibsSupportTestCase extends AbstractFakeMuleServerTestCase {

@Rule
Expand Down Expand Up @@ -70,7 +74,7 @@ public void log4jLibraryLogsSuccessfully() throws Exception {
}

@Test
@Ignore("W-11730386")
@FlakyTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the flakiness detector once it passes.

public void jclLibraryLogsSuccessfully() throws Exception {
startRuntimeWithApp();
probeLogFileForMessage("My logger is JCL");
Expand All @@ -89,7 +93,7 @@ private void probeLogFileForMessage(String expectedMessage) {
() -> format("Text '%s' not present in the logs", expectedMessage));
}

private void startRuntimeWithApp() throws URISyntaxException, IOException, MuleException, MalformedURLException {
private void startRuntimeWithApp() throws IOException, MuleException, URISyntaxException {
final ApplicationFileBuilder loggingAppFileBuilder =
new ApplicationFileBuilder("logging-app").definedBy("log/logging-libs/logging-libs-app.xml")
.dependingOn(new JarFileBuilder("loggerLibsClient",
Expand All @@ -100,5 +104,6 @@ private void startRuntimeWithApp() throws URISyntaxException, IOException, MuleE

muleServer.start();
muleServer.deploy(loggingAppFileBuilder.getArtifactFile().toURI().toURL(), "logging-app");
muleServer.stop();
}
}