current git fails to build with assertionin testWaitOnBackgroundThread [message #1852840] |
Tue, 07 June 2022 11:40  |
Eclipse User |
|
|
|
Hi,
I've just tried to compile the current git master (using maven 3.5.4) in order to work on a proof-of-concept implementation of the proposed option mentioned in https://github.com/eclipse-rap/org.eclipse.rap/issues/22
However, it fails with assertion errors in tests. Any idea what is going on here?
Thanks & best regards, Clemens
-------------------------------------------------------------------------------
Test set: org.eclipse.rap.rwt.internal.serverpush.ServerPushManager_Test
-------------------------------------------------------------------------------
Tests run: 35, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.992 s <<< FAILURE! - in org.eclipse.rap.rwt.internal.serverpush.ServerPushManager_Test
testWaitOnBackgroundThread(org.eclipse.rap.rwt.internal.serverpush.ServerPushManager_Test) Time elapsed: 0.298 s <<< FAILURE!
java.lang.AssertionError
at org.eclipse.rap.rwt.internal.serverpush.ServerPushManager_Test.testWaitOnBackgroundThread(ServerPushManager_Test.java:139)
-------------------------------------------------------------------------------
Test set: org.eclipse.rap.rwt.internal.resources.ClientResources_Test
-------------------------------------------------------------------------------
Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.301 s <<< FAILURE! - in org.eclipse.rap.rwt.internal.resources.ClientResources_Test
testIncludesDebugSettings(org.eclipse.rap.rwt.internal.resources.ClientResources_Test) Time elapsed: 0.212 s <<< FAILURE!
java.lang.AssertionError
at org.eclipse.rap.rwt.internal.resources.ClientResources_Test.testIncludesDebugSettings(ClientResources_Test.java:84)
|
|
|
Re: current git fails to build with assertionin testWaitOnBackgroundThread [message #1852957 is a reply to message #1852840] |
Mon, 13 June 2022 08:10   |
Eclipse User |
|
|
|
Hi,
I have two comments here:
1. There are several tests that are "time limit" dependent. This is not a "real" failure, but the waiting time for a task to complete is not enough.
2. Some tests need "client.js" to be available (built). If you run the tests from the IDE and not by Tycho build, please make sure that you run the ClientBuilder first to create "client.js".
Best regards,
Ivan
|
|
|
Re: current git fails to build with assertionin testWaitOnBackgroundThread [message #1857334 is a reply to message #1852957] |
Tue, 31 January 2023 16:54   |
Eclipse User |
|
|
|
Hi,
I just encountered the test failure in ClientResources_Test.testIncludeDebugSettings and I think that I figured out what causes it:
It is the line endings. The test checks for a string literal which contains \n as a line delimiter. When checking-out in a Windows environment, sources may contain \r\n as line delimiters and that is probably, why this check fails.
Maybe the test can be changed ?
This might already be known, but I searched for this test failure and found two posts with no obvious solution.
Best regards,
Gunnar
|
|
|
|
Re: current git fails to build with assertionin testWaitOnBackgroundThread [message #1857389 is a reply to message #1857388] |
Fri, 03 February 2023 09:51   |
Eclipse User |
|
|
|
Hi,
thanks for your response.
Probably your git is configured differently.
Please refer to
https://stackoverflow.com/questions/10418975/how-to-change-line-ending-settings
<quote>
Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows ("core.autocrlf" is set to "true")
<unquote>
The problem with that specific test is just, that it searches for a string containing the single linefeed character within the client.js file.
This does not work if the above git setting is active.
In order to fix this for me I modified line 84 in ClientResources_Test.java the test to:
assertTrue( content.contains( "qxvariants = {\n \"qx.debug\" : \"on\"\n};" ) || content.contains( "qxvariants = {\r\n \"qx.debug\" : \"on\"\r\n};" ) );
Best regards
Gunnar
|
|
|
|
Powered by
FUDForum. Page generated in 0.03228 seconds