-
Notifications
You must be signed in to change notification settings - Fork 67
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
Tests are failing when running on M1 Mac #57
Comments
I believe the root cause is that the standard Pulsar image running through emulation is very slow. This leads to Testcontainers startup check to time out, thus stopping further test execution. The issue around offering ARM based images can be found here: And the experimental image above was built using this PR: I tried to re-ignite the discussion on the mailing list around this topic and looped in colleagues as well.
Edit: After some further investigation this is not as straightforward. The JUnit annotation only works on a (@test) method level, not block-level. So we cannot keep the shared testcontainer as it is. The second problem is that the Maybe the best way is to let users set an environment variable if they are using the M1 chip and exchange the image name when it's set. |
Great find @alpreu - thanks for digging in. Maybe we can put a custom "condition" in the static initializer to determine image name. static {
MyCustomCondition isMacCondition = ...
if (isMacCondition) {
image = "";
}
else {
image = "";
}
DockerImageName PULSAR_IMAGE = DockerImageName.parse("apachepulsar/pulsar:2.10.1");
PULSAR_CONTAINER = new PulsarContainer(PULSAR_IMAGE);
PULSAR_CONTAINER.start();
} We would still need to find the "magic formula" from inspecting system props to determine if it is M1. However, based on t he info in previous comment it may not be a solid approach w/ sys props as it only reports to the jvm. Let's explore any other means to determine if the current user is on an M1 or not. We could always drop back to the ENVVAR idea as well. |
NOTE: As of 2.11.0 the standard Pulsar image is now able to run on Mac M1. |
Steps to reproduce: Run
gradle clean build
on an M1 Mac.Possible cause: Pulsar image running super slow because of M1 Mac?
Workaround: Modify the image used in https://github.com/spring-projects-experimental/spring-pulsar/blob/749f2dbb5e386f77e842af2ece547fbdc0e8f84f/spring-pulsar/src/test/java/org/springframework/pulsar/core/AbstractContainerBaseTests.java#L24
with
Work items
The text was updated successfully, but these errors were encountered: