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

Apple Silicon emulation issue in unit tests #1209

Closed
joshfischer1108 opened this issue May 3, 2024 · 3 comments
Closed

Apple Silicon emulation issue in unit tests #1209

joshfischer1108 opened this issue May 3, 2024 · 3 comments
Assignees
Milestone

Comments

@joshfischer1108
Copy link
Member

When compiling Stormcrawler from source on Apple Silicon we are hitting timeout issues in selenium tests due to emulation issues.

Steps to reproduce:

Using an Apple M3:
From the top level directory run:

mvn clean install

First we get this warning.

The architecture 'amd64' for image 'selenium/standalone-chrome:120.0' (ID sha256:deff784da2138b912b66e2941cc976ced4ecba3a4e6941ca3bfa2b8c88886b75) does not match the Docker server architecture 'arm64'. This will cause the container to execute much more slowly due to emulation and may lead to timeout failures.

Then we get this error:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 27.48 s <<< FAILURE! -- in org.apache.stormcrawler.protocol.selenium.ProtocolTest
[ERROR] org.apache.stormcrawler.protocol.selenium.ProtocolTest.testBlocking -- Time elapsed: 27.44 s <<< ERROR!
org.awaitility.core.ConditionTimeoutException: Condition with org.apache.stormcrawler.protocol.selenium.ProtocolTest was not fulfilled within 10 seconds.

Then the error should appear

@rzo1
Copy link
Contributor

rzo1 commented May 3, 2024

Guess it is more or less an upstream thing: SeleniumHQ/docker-selenium#1076

Might be worth adding a profile which exclude those tests from being run on arm64, or to write a vustom JUnit 5 extension to disable them in OSX ARM, or to try Geckodriver, or to play with the timeouts.

Guess we can start with increasing timeouts or switching to Geckodriver (which should be arm ready from cross reading).

@joshfischer1108
Copy link
Member Author

joshfischer1108 commented May 3, 2024

I'm looking at the test. Are these the timeouts? I've changed them to much higher values such as 100000 and the tests seem to timeout about the same time on my machine (which is around 27 seconds)

 timeouts.put("implicit", 10000);
timeouts.put("pageLoad", 10000);
timeouts.put("script", 10000);

conf.put("selenium.timeouts", timeouts);

@joshfischer1108
Copy link
Member Author

I forgot to add the link. Here is where I am looking

joshfischer1108 added a commit to joshfischer1108/incubator-stormcrawler that referenced this issue May 3, 2024
rzo1 pushed a commit that referenced this issue May 5, 2024
* #1209 fix for emulation error in tests run on silicon

* lock down dep
@rzo1 rzo1 added this to the 3.0 milestone May 5, 2024
@rzo1 rzo1 closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants