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

tests broken on jdk 17 #325

Open
davidcoutadeur opened this issue Jan 10, 2025 · 2 comments
Open

tests broken on jdk 17 #325

davidcoutadeur opened this issue Jan 10, 2025 · 2 comments
Labels
bug NGI Work sponsored by NGI
Milestone

Comments

@davidcoutadeur
Copy link
Contributor

When compiling with jdk17, we get these errors at test step:

[ERROR] Failures: 
[ERROR]   Ldap2JdbcSyncTest.testSyncLdap2Db:209 After 2nd Sync wrong Mail expected:<null> but was:<[email protected]>
[ERROR]   Ldap2LdapBinaryPivotWithStringConversionSyncTest>Ldap2LdapBinaryPivotSyncTest.testClean:167
[ERROR]   Ldap2LdapBinaryPivotWithStringConversionSyncTest>Ldap2LdapBinaryPivotSyncTest.testSync:104
[ERROR]   Ldap2LdapHookSyncTest.testLdap2LdapJSONHookSyncTest:99->launchSyncCleanTask:259
[ERROR]   Ldap2LdapSyncTest.testSyncLdap2Ldap:164->checkSyncResultsFirstPass:184->checkSyncResultsCommon:292->checkBinaryAttributeValue:371
[ERROR]   LscJmxTest.test1SyncByObject:128
[ERROR]   JScriptEvaluatorTest.testList:132 expected:<2> but was:<1>
[ERROR]   JScriptEvaluatorTest.testNk Expected exception: org.lsc.exception.LscServiceException
[ERROR]   JScriptEvaluatorTest.testOk:93 expected:<[b]> but was:<[org.mozilla.javascript.NativeJavaObject@62]>
[ERROR]   JScriptEvaluatorTest.testOkLdap:164 expected:<[[People, dc=lsc-project,dc=org]]> but was:<[[org.mozilla.javascript.NativeJavaList@81ba71ba]]>
[INFO] 
[ERROR] Tests run: 94, Failures: 10, Errors: 0, Skipped: 0
@davidcoutadeur davidcoutadeur added this to the 2.2 milestone Jan 10, 2025
@coudot coudot added the NGI Work sponsored by NGI label Jan 13, 2025
@elecharny
Copy link

elecharny commented Jan 13, 2025

The resultSet has no guarantee about the order of the returned elements:

Select * FROM %s WHERE ID = '%s'",DEST_TABLE,DN_ADD_EXID

The whileloop is incorrect:

			while (rs.next()) {
				rowcount ++;
				for (int i = 1; i <= columnCount; i++) {
					if (i == 2) // Mail   <--------------------- NEVER assume Mail will be at offset 2 !!!
						Assert.assertEquals("After 2nd Sync wrong Mail", null,rs.getString(i));
					if (i == 7) // Description
						Assert.assertEquals("After 2nd Sync wrong Description", DN_ADD_DESC,rs.getString(i));
					if (i == 8) // Telephone
						Assert.assertEquals("After 2nd Sync wrong Telephone", DN_ADD_TEL,rs.getString(i));
					if (text.length() > 0) 
						text.append(", ");
					text.append(rs.getString(i));
				}
				LOGGER.debug(text.toString());
			}

Note that it's not the root cause of the problem. Actually, the MAIL value is not null when it should be.

@elecharny
Copy link

The test fails because the GraalVM Javascript engine cannot be started:

ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.oracle.truffle.js.scriptengine.GraalJSEngineFactory could not be instantiated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug NGI Work sponsored by NGI
Projects
None yet
Development

No branches or pull requests

3 participants