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

Unit tests failing on windows due to OS-specific constructions #64

Closed
vhemery opened this issue Jan 14, 2021 · 1 comment
Closed

Unit tests failing on windows due to OS-specific constructions #64

vhemery opened this issue Jan 14, 2021 · 1 comment

Comments

@vhemery
Copy link
Contributor

vhemery commented Jan 14, 2021

When executing on windows, unit tests in org.eclipse.emfcloud.modelserver.emf.tests fail. (on master branch, commit 4d383b9 )
image
Some are due to #63 , but there are other causes, most probably specific to the windows OS.

The following tests fail due to a difference in whitespaces characters (mainly "\n" vs "\r\n" line breaks) :

  • org.eclipse.emfcloud.modelserver.emf.common.ModelControllerTest.getModelelementByNameXmiFormat()
  • org.eclipse.emfcloud.modelserver.emf.common.ModelControllerTest.getModelelementByIdXmiFormat()
  • org.eclipse.emfcloud.modelserver.emf.EMFJsonConverterTest.testToJsonSimple()
  • org.eclipse.emfcloud.modelserver.emf.EMFJsonConverterTest.testToJsonCoffeeJson()
    I suggest calling org.junit.platform.commons.util.StringUtils.replaceWhitespaceCharacters(String, String) when comparing strings to avoid this issue.

Some other tests fail with "java.lang.IllegalArgumentException: resolve against non-hierarchical or relative base". This is the case of :

  • org.eclipse.emfcloud.modelserver.emf.common.ModelControllerTest.executeCommand()
  • org.eclipse.emfcloud.modelserver.emf.common.ModelControllerTest.addCommandNotification()
    We'll have to investigate more, but my first guess would be a difference of separator in constructed URIs.

Finally, these tests fail (directly or indirectly) due to differences in built URIs (difference of separator) :

  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.normalizeWorkspaceRoot()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.getUiSchemaFolder()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.normalizeWorkspaceRootSlashAlreadyPresent()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.setWorkspaceRoot()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.normalizeWorkspaceRootEncoded()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.getWorkspaceEntries()
    And also probably (but must be confirmed by investigation) :
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.isUiSchemaFolder()
  • org.eclipse.emfcloud.modelserver.emf.configuration.ServerConfigurationTest.isValidFileURI()
@martin-fleck-at
Copy link
Contributor

Thank you very much for bringing this to our attention! we were not aware of the OS-dependent test failures and will look at this in more detail when we are working on the overall test story (#62 , #63).

martin-fleck-at added a commit that referenced this issue Mar 13, 2021
- Remove OS-specific setting from unit tests
- Use GitHub actions to run tests on several platforms

Signed-off-by: Martin Fleck <[email protected]>
martin-fleck-at added a commit that referenced this issue Mar 13, 2021
- Remove OS-specific setting from unit tests
- Use GitHub actions to run tests on several platforms

Signed-off-by: Martin Fleck <[email protected]>
martin-fleck-at added a commit that referenced this issue Mar 13, 2021
- Remove OS-specific setting from unit tests
- Use GitHub actions to run tests on several platforms

Signed-off-by: Martin Fleck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants