Open mrlimbic opened 1 year ago
Which version of the JDK?
I tried jdk 11, 17, 18 and 20.
What's the error message that you get from the failed test?
Assertion error. Looks like took too long.
"Time elapsed: 0.004 s <<< FAILURE!"
There's probably a race condition happening on your system for some reason that makes the main thread finish before the other thread. I wouldn't worry about it, but we should figure out how to make the test work more reliability. A Thread.sleep(100) before that line might do the trick.
I added Thread.sleep(100) before the assert and still fails.
Going to try on my new laptop which is running a later Mac OS to see if same happens.
-------------------------------------------------------------------------------
Test set: org.bytedeco.javacpp.ThreadTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.43 s <<< FAILURE! - in org.bytedeco.javacpp.ThreadTest
testJNIThreadAttachFromNativeCallbacks(org.bytedeco.javacpp.ThreadTest) Time elapsed: 0.11 s <<< FAILURE!
java.lang.AssertionError
at org.bytedeco.javacpp.ThreadTest.testJNIThreadAttachFromNativeCallbacks(ThreadTest.java:107)
Tried building on my intel laptop with JDK 17 + Mac OS 10.13.1(a) but same test fails again.
Do you really think it is not indicative of a problem on Mac OS, only the test that is not good?
@masterav10 Any ideas?
Have you tried pulling out the relevant parts from the generated "jnijavacpp.cpp" and see how they behave natively? I use visual studio on Windows, which is where I do most of my testing. I remember doing this quite a bit when I was testing the original feature.
Without looking too closely, I didn't touch anything mac-related, unless you are running a cpp11 compiler. In this case, you get the new behavior.
Downloaded latest snapshot and cannot build on intel mac. This test fails. Any ideas why?