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

Integration tests fail on Windows #39904

Closed
costin opened this issue Mar 11, 2019 · 3 comments · Fixed by #39959
Closed

Integration tests fail on Windows #39904

costin opened this issue Mar 11, 2019 · 3 comments · Fixed by #39959
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v8.0.0-alpha1

Comments

@costin
Copy link
Member

costin commented Mar 11, 2019

The latest master cannot run integration tests on windows due to:

Exception in thread "main" java.nio.file.AccessDeniedException: C:\Windows\elasticsearch
	at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
	at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
	at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:504)
	at java.nio.file.Files.createDirectory(Files.java:674)
	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
	at java.nio.file.Files.createDirectories(Files.java:767)
	at org.elasticsearch.tools.launchers.TempDirectory.main(TempDirectory.java:52)

It looks like the temporary folder is not set which causes the default/system folder (C:\Windows) to be used instead which obviously fails.

From try-outs it looks commit 465343f introduced this change in behavior.

@costin costin added the :Delivery/Build Build or test infrastructure label Mar 11, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@costin costin added the v8.0.0 label Mar 11, 2019
@alpar-t
Copy link
Contributor

alpar-t commented Mar 12, 2019

I managed to reproduce this on a Win2012r2 image we use for packaging tests in CI.
using gradlew -p x-pack/plugin/sql/qa/single-node check without setting runtime java. I do have TMP set. Running the run.bat wrapper script doesn't reproduces the problem, which leads me to believe the problem is that env vars do not get sent when this is called.
This reproduces with RUNTIME_JAVA_HOME set as well

@alpar-t
Copy link
Contributor

alpar-t commented Mar 12, 2019

I can confirm that the env is not inherited by the wrapper script:

COMSPEC=C:\Windows\SYSTEM32\cmd.exe
ES_JAVA_OPTS=-Xms512m -Xmx512m  -ea -esa
ES_PATH_CONF=C:\ELASTI~1\x-pack\plugin\sql\qa\single-node\build\cluster\integTestCluster node0\elasticsearch-8.0.0-SNAPSHOT\config
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC
PROMPT=$P$G
SystemRoot=C:\Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v8.0.0-alpha1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants