Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

/scripts/build.sh fails two unit tests #51

Open
dapeng09 opened this issue Aug 17, 2020 · 5 comments
Open

/scripts/build.sh fails two unit tests #51

dapeng09 opened this issue Aug 17, 2020 · 5 comments

Comments

@dapeng09
Copy link

[ERROR] Failures:
[ERROR] SpelTaskEvaluatorTests.test32:289 expected: </> but was:
[ERROR] MkdirTests.test2:27 Expected java.nio.file.FileSystemException to be thrown, but nothing was thrown.
[INFO]
[ERROR] Tests run: 98, Failures: 2, Errors: 0, Skipped: 0

Assertions.assertEquals(FilenameUtils.getFullPathNoEndSeparator(System.getProperty("java.io.tmpdir")),evaluated.get("tempDir"));
java.io.tmpdir is /tmp on my machine, and getFullPathNoEndSeparator gives "/", which is not equal to "/tmp"

task.set("path", "/no/such/thing");
Files.createDirectories() will not throw expected exception.

Am I missing anything here?

Thanks

@runabol
Copy link
Owner

runabol commented Aug 17, 2020

Interesting. I just ran it locally on my machine and it worked. What OS are you on?

@dapeng09
Copy link
Author

hi I am runing on CentOS 7

@dapeng09
Copy link
Author

@okayrunner Hi just a little confused, what's the point of MkdirTests.test2 and why it's expected to throw an exception? It creates /no/such/thing directory anyways

@dapeng09
Copy link
Author

and now I tried running it on a clean Ubuntu18.04.3 LTS, I got the same error again.
I guess you set the variable java.io.tmpdir on your machine?

@dapeng09
Copy link
Author

Appreciate if you can look at this and help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants