Skip to content

Update to Smack 4.0#299

Closed
Flowdalic wants to merge 1 commit into
apache:masterfrom
Flowdalic:smack40
Closed

Update to Smack 4.0#299
Flowdalic wants to merge 1 commit into
apache:masterfrom
Flowdalic:smack40

Conversation

@Flowdalic
Copy link
Copy Markdown

Remove Presence Packet listener in XmppConsumer. It never worked, since
the processPacket() method does check if the given Packet is instanceof
Message, so the filtered Presence Packets never got processed.

XMPPError.getCode() is no more. Integer error codes have been deprecated
from XMPP for a while. Use getType() instead.

Use the connection packet reply timeout, instead of the global one in
SmackConfiguration (where the method name was changed to
SmackConfiguration.getDefaultPacketReplyTimeout()).

Use JivePropertiesManager for Packet properties.

Fixes CAMEL-7903

@Flowdalic
Copy link
Copy Markdown
Author

Note that #93 has also related changes for camel-xmpp. I suggest to merge #299 first and then rebase #93 (if required).

@WillemJiang
Copy link
Copy Markdown
Member

Hi Fowdalic,

I tried to apply the PR to Apache Camel master branch, now I got the lots of unit test failures:
Did I miss something?

XmppDeferredConnectionTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppMultiUserChatTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppProducerConcurrentTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppProducerConcurrentTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppRobustConnectionTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppRouteChatTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppRouteMultipleProducersSingleConsumerTest>CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:311->CamelTestSupport.startCamelContext:477 ? FailedToCreateProducer
XmppRouteTest.setUp:117 ? FailedToCreateProducer Failed to create Producer for...

@Flowdalic
Copy link
Copy Markdown
Author

How did you run tun the unit tests? Are there no stacktraces or exceptions? Which java runtime version are you using?

I could swear mvn install run without failures for me a day ago, but know I get also failures, although different ones:

-------------------------------------------------------------------------------
Test set: org.apache.camel.component.bean.BeanComponentConfigurationAndDocumentationTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.104 sec <<< FAILURE! - in org.apache.camel.component.bean.BeanComponentConfigurationAndDocumentationTest
testComponentDocumentation(org.apache.camel.component.bean.BeanComponentConfigurationAndDocumentationTest)  Time elapsed: 0.002 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Should have found some auto-generated HTML
    at junit.framework.Assert.fail(Assert.java:57)
    at junit.framework.Assert.assertTrue(Assert.java:22)
    at junit.framework.Assert.assertNotNull(Assert.java:256)
    at junit.framework.TestCase.assertNotNull(TestCase.java:426)
    at org.apache.camel.component.bean.BeanComponentConfigurationAndDocumentationTest.testComponentDocumentation(BeanComponentConfigurationAndDocumentationTest.java:52)

What is the standard way to invoke the unit tests in Apache Camel?

@Flowdalic
Copy link
Copy Markdown
Author

Now I got

  ConfigAdminOverridePropertiesTest>CamelBlueprintTestSupport.setUp:183->CamelTestSupport.setUp:217->CamelTestSupport.doSetUp:247->CamelBlueprintTestSupport.createCamelContext:352 » Runtime

that looks similar to yours, investigating.

Remove Presence Packet listener in XmppConsumer. It never worked, since
the processPacket() method does check if the given Packet is instanceof
Message, so the filtered Presence Packets never got processed.

XMPPError.getCode() is no more. Integer error codes have been deprecated
from XMPP for a while. Use getType() instead.

Use the connection packet reply timeout, instead of the global one in
SmackConfiguration (where the method name was changed to
SmackConfiguration.getDefaultPacketReplyTimeout()).

Use JivePropertiesManager for Packet properties.

Fixes CAMEL-7903
@Flowdalic Flowdalic changed the title Update to Smack 4.0.4 Update to Smack 4.0 Nov 3, 2014
@Flowdalic
Copy link
Copy Markdown
Author

I've pushed a new version of the commit. There are some issues I'd like to get feedback on how to solve them:

  • The EmbeddedXmppTestServer (vysper) doesn't seem to be able to run without TLS being required. In order to establish a TLS secured XMPP connection, Smack needs to accept the certificate. Right now acceptAllCertificates, a new field in XmppEndpoint defaults to true to achieve this. But for security reasons, this shouldn't be the default, and only be used e.g. for the unit tests. Not sure how to do this.
  • I just seem to can't get the unit tests to succeed, even when using the master branch, mvn clean install fails for me. Which makes it hard for me to further develop the smack40 branch. I think it's nearly finished, but it would be great of some experiences Apache Camel developer would help me finishing the branch.

@Flowdalic
Copy link
Copy Markdown
Author

Friendly reminder: Still waiting for feedback from the maintainers.

@Flowdalic
Copy link
Copy Markdown
Author

Obsoleted by b909dec

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.

2 participants