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

[sint] Fix compatibility with Smack 4.5.0-beta2 #630

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Sep 18, 2024

Due to a change in Smack 4.5.0-beta2, test execution of (all) SINT tests is aborted when FormTest is executed.

It appears that Smack now has more strict argument validation when setting thread IDs on message stanzas. This validation should not fail for the tests that are shipped with Smack.

This is the stack trace when executing the failing test (which no longer occurs after the change in this commit is applied):

Exception in thread "main" java.lang.IllegalArgumentException: thread must not be null nor empty
        at org.jivesoftware.smack.util.StringUtils.requireNotNullNorEmpty(StringUtils.java:533)
        at org.jivesoftware.smack.packet.Message$Thread.<init>(Message.java:326)
        at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:70)
        at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:66)
        at org.jivesoftware.smackx.xdata.FormTest.testFilloutForm(FormTest.java:133)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.lambda$runTests$0(SmackIntegrationTestFramework.java:476)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runConcreteTest(SmackIntegrationTestFramework.java:556)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$PreparedTest.run(SmackIntegrationTestFramework.java:764)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:544)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:277)
        at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:115)

@guusdk
Copy link
Member Author

guusdk commented Sep 18, 2024

The build failure of this PR does not seem to be related to the changes in this PR.

guusdk added a commit to XMPP-Interop-Testing/smack-sint-server-extensions that referenced this pull request Sep 18, 2024
The new Smack beta has dropped some old API. This commit adjusts our code accordingly.

Sadly, one of the tests that ship with Smack now fail (see igniterealtime/Smack#630 ). That test has been disabled in the CI for this project.
guusdk added a commit to XMPP-Interop-Testing/smack-sint-server-extensions that referenced this pull request Sep 18, 2024
The new Smack beta has dropped some old API. This commit adjusts our code accordingly.

Sadly, one of the tests that ship with Smack now fail (see igniterealtime/Smack#630 ). That test has been disabled in the CI for this project.
guusdk added a commit to XMPP-Interop-Testing/smack-sint-server-extensions that referenced this pull request Sep 18, 2024
The new Smack beta has dropped some old API. This commit adjusts our code accordingly.

Sadly, one of the tests that ship with Smack now fail (see igniterealtime/Smack#630 ). That test has been disabled in the CI for this project.
Due to a change in Smack 4.5.0-beta2, test execution of (all) SINT tests is aborted when `FormTest` is executed.

It appears that Smack now has more strict argument validation when setting thread IDs on message stanzas. This validation should not fail for the tests that are shipped with Smack.

This is the stack trace when executing the failing test (which no longer occurs after the change in this commit is applied):

```
Exception in thread "main" java.lang.IllegalArgumentException: thread must not be null nor empty
	at org.jivesoftware.smack.util.StringUtils.requireNotNullNorEmpty(StringUtils.java:533)
	at org.jivesoftware.smack.packet.Message$Thread.<init>(Message.java:326)
	at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:70)
	at org.jivesoftware.smack.packet.MessageBuilder.setThread(MessageBuilder.java:66)
	at org.jivesoftware.smackx.xdata.FormTest.testFilloutForm(FormTest.java:133)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.lambda$runTests$0(SmackIntegrationTestFramework.java:476)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runConcreteTest(SmackIntegrationTestFramework.java:556)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework$PreparedTest.run(SmackIntegrationTestFramework.java:764)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.runTests(SmackIntegrationTestFramework.java:544)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.run(SmackIntegrationTestFramework.java:277)
	at org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.main(SmackIntegrationTestFramework.java:115)
```
@guusdk guusdk force-pushed the sint_formtest-smack-4.5.0-beta2 branch from 1e9b53f to e4fcdb6 Compare September 19, 2024 08:51
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

Successfully merging this pull request may close these issues.

1 participant