Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » current git fails to build with assertionin testWaitOnBackgroundThread
current git fails to build with assertionin testWaitOnBackgroundThread [message #1852840] Tue, 07 June 2022 11:40 Go to next message
Linuxhippy Mising name is currently offline Linuxhippy Mising nameFriend
Messages: 71
Registered: July 2009
Member
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 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 Go to previous messageGo to next message
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 49
Registered: May 2016
Member
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 #1857388 is a reply to message #1857334] Fri, 03 February 2023 09:37 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

I'm building RAP framework on Windows every day and I've never encounter such an error. All sources and resource in RAP have Linux line endings.

Best regards,
Ivan
Re: current git fails to build with assertionin testWaitOnBackgroundThread [message #1857389 is a reply to message #1857388] Fri, 03 February 2023 09:51 Go to previous messageGo to next message
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 49
Registered: May 2016
Member
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
Re: current git fails to build with assertionin testWaitOnBackgroundThread [message #1857521 is a reply to message #1857389] Mon, 13 February 2023 08:22 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

RAP project is using LF as line ending from the beginning. We recommend to set the Git option not to change the line ending during the check-out/commit.

Best regards,
Ivan
Previous Topic:Text control not wide enough in italic font
Next Topic:ToolTip for JFace Table
Goto Forum:
  


Current Time: Tue Jul 16 15:41:48 GMT 2024

Powered by FUDForum. Page generated in 0.03584 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top