Commit Graph

153 Commits

Author SHA1 Message Date
Dan Caseley cd6ff363c6 [sinttest] Refactor MUC tests ready to add more 2021-06-15 13:03:46 +01:00
Florian Schmaus 64db6e3ebc [openpgp] Remove INFO log sites
INFO log sites should be used sparingly and carefully. Those are a
good examples for an unnecessary INFO log sites.
2021-05-02 18:45:25 +02:00
Dan Caseley fc191e4e19 [sinttest] Add XEP reference for muc destroy test 2021-04-26 13:28:00 +01:00
Dan Caseley b541397119 [sinttest] Fix typo in muc XEP reference for test 2021-04-26 13:26:29 +01:00
Florian Schmaus 6a78e4ad09 [sinttest] Do not catch exceptions when destroying a MUC
If something goes wrong when destroying a MUC, we want to be notified
about it immediately, as further results of the integration test run
are unreliable anyway.
2021-04-26 09:42:20 +02:00
Florian Schmaus a36251ff7d Merge remote-tracking branch 'github/pr/469' into muc 2021-04-26 09:08:44 +02:00
Florian Schmaus 0c397294e1 Merge remote-tracking branch 'github/pr/468' into muc 2021-04-26 09:00:50 +02:00
Dan Caseley 920b686f29 Add kick presence tests
Inspired by OF-2240. Used to validate the problem, then test the fix.
2021-04-25 14:32:58 +01:00
Dan Caseley 642f5bde61 [sinttest] Fix ordering of parameters in muc assertEquals checks 2021-04-23 16:50:33 +01:00
Florian Schmaus 8a91021a0e [sinttest] Improve MultiUserChatIntegrationTest.tryDestroy(MultiUserChat) 2021-04-18 21:35:34 +02:00
Dan Caseley aff6283798 Add MUC tests for presence & self-presence for role & affiliation changes 2021-04-07 10:33:38 +01:00
Guus der Kinderen 252cea1149 SINT: MAM test does not require XEP-0441
The MAM integration test setup attepts to set MAM preferences (XEP-0441).
When a server does not support this XEP, the setup phase errors out, preventing
the tests from being executed.

There is no functional reason why tests shouldn't be run when XEP-0441 is not
supported: the tests can run against the default configuration of the MAM
service.

This commit ignores feature-not-implemented errors when MAM
preferences are set.

[Ignore only feature-not-implemented errors, log ignored errors)
Modified-by: Florian Schmaus <flo@geekplace.eu>
2021-04-01 13:13:42 +02:00
Florian Schmaus 4fefa92e40 Merge branch '4.4' 2021-03-19 09:47:07 +01:00
Florian Schmaus 73941629f3 [sinttest] Call OutgoingFiletransfer.getException() in case of error 2021-03-14 17:57:13 +01:00
Florian Schmaus 4aacdc5154 Add smack-websocket-java11
This also lifts a bunch of logic from smack-websocket-okhttp into
smack-websocket. Furthermore, the following subprojects require now
Java 11:
- smack-integration-test
- smack-omemo-signal-integration-test
- smack-repl
- smack-websocket-java11

Related tracking issue: SMACK-835
2021-02-14 20:34:40 +01:00
Guus der Kinderen a809f181f5 In tests, use specific assertion implementation
These generate more helpful error messages when assertions fail and
help to show intent.
2020-10-27 11:30:44 +01:00
Aditya Borikar fcaeca48ec Add SimpleXmppConnectionIntegrationTest 2020-07-22 16:35:56 +05:30
Paul Schaub 6e57ea0873
Allow user-supplied secret key backup passphrases
Instead of passing the passphrase back to the user via a
DisplayBackupCodeCallback, we directly return the passphrase
which is now represented by a class.

Also we now allow the user to provide the passphrase.
2020-07-15 22:22:42 +02:00
Florian Schmaus 6266f04682
Merge pull request #397 from vanitasvitae/oxProviderImprov
Remove constructor dependency on XMPPConnection from OpenPgpProvider
2020-06-15 17:52:54 +02:00
Paul Schaub 4a878ff175
Remove constructor dependency on XMPPConnection from OpenPgpProvider 2020-06-15 14:02:18 +02:00
adiaholic 1d49de6b60 Add integration test for MultiUserChat
SMACK-888 has a mention of unreachable code and is now solved
under commit 0f7b7df.
This integration test tests those class entities which were to
be set by previously stated unreachable code.
2020-06-04 22:46:52 +02:00
Florian Schmaus 2900cc2274 [sinttest] Disconnect connection in LoginIntegrationTest
So that it will cause an connectionClosedOnError() callback, caused by
an connection-timeout stream error.
2020-05-31 21:00:42 +02:00
Florian Schmaus 57961a8cc1 Remove SynchronizationPoint
This continues the design started with e98d42790 ("SmackReactor/NIO,
Java8/Android19, Pretty print XML, FSM connections"), where the
exceptions that caused an operation to fail, are not recorded within
SynchronizationPoint but within the connection instance itself.
2020-05-31 19:48:47 +02:00
Florian Schmaus f5448c5faa [core] Rework TLS logic
This moves the logic in AbstractXMPPConnection.getSmackTlsContext()
into the ConnectionConfiguration constructor.

Also introduce SslContextFactory and use it in
ConnectionConfiguration.
2020-05-25 15:41:57 +02:00
Florian Schmaus d65f2c932e Bump Error Prone version to 2.3.4 and fix new bug patterns 2020-05-24 21:10:01 +02:00
Florian Schmaus ebe5c49e92 [checkstyle] Tighten JavadocMethod checkstyle rule 2020-05-23 22:43:29 +02:00
Florian Schmaus 5bfe789e08 [sinttest] Add unreliable workaround for XEP-0030 based operations 2020-05-22 15:44:23 +02:00
Aditya Borikar 17ca4c541b Add support for XEP-0232: Software Information
By making use of an extended data format, service discovery responses
can be used to constitute software information.
Solves SMACK-853.
2020-05-16 14:02:25 +05:30
Florian Schmaus 77e26fc575 Re-work data form API
Apply builder pattern to form fields and replace getVariable() with
getFieldName(). Refer to the field name as "field name" instead of
"variable" everyone, just as XEP-0004 does.

Improve the high-level form API: introduce FilledForm and FillableForm
which perform stronger validation and consistency checks.

Also add FormFieldRegistry to enable processing of 'submit' forms
where the form field types are omitted.

Smack also now does omit the form field type declaration on 'submit'
type forms, as it is allowed by XEP-0004.
2020-05-13 20:14:41 +02:00
Florian Schmaus dd248adb28 sinttest: delcare boolean in WaitForClosingStreamElementTest 2020-04-13 22:49:31 +02:00
Florian Schmaus 9b20e2efd8 sinttest: signal failure if geoloc element does not match 2020-04-13 15:28:17 +02:00
Florian Schmaus 6d9936a0a6 geoloc: do not set error in integration test
As error is deprecated. And should be marked as such.
2020-04-13 15:27:43 +02:00
Florian Schmaus 340bcb2d12 pep: improve API, add PepEventListener
The geoloc, mood and usertune PEP users showed a pattern. Instead of
repeating this pattern every time, let PepManager do the hard work
2020-04-13 15:26:46 +02:00
Florian Schmaus 7c2f9e3603 pep: cleanup pep users API
Use EntityBareJid just as its done within PepManager. There is no need
for AsyncButOrdered in the PEP user managers, as PepManager already
takes care of that. Also the message carrying the PEP event should
always be the last parameter of the callbacks, as it is the least
important piece of information.
2020-04-13 12:14:32 +02:00
Florian Schmaus e8fef260e6 sinttest: migrate to JUnit5, drop JUnit4
The before/after class annotations are now no longer borrowed from
JUnit.

Also some integration tests used @After and/or @Before from JUnit,
which was never supported nor had any effected. Those methods got
deleted. But since there appears to be a desire for such a
functionality in sinttest, we should consider adding one.
2020-04-12 22:21:30 +02:00
Florian Schmaus fdeaaf368e
Merge pull request #350 from adiaholic/pepOverPubsub
Make use of `pep` instead of `pubsub` in GeoLocations
2020-04-12 19:20:04 +02:00
Florian Schmaus 594d2f5238 sinttest: convert LoginIntegrationTest to Junit5 2020-04-11 12:18:18 +02:00
Florian Schmaus 79b9c7b934 sinttest: add testDisconnectedNeverConnected for modular connection 2020-04-09 21:09:42 +02:00
Florian Schmaus e68b89d266 sinttest: rename and move ModularXmppClientToServerConnection test
Rename and move the test in the correct package.
2020-04-09 21:09:17 +02:00
adiaholic 340e186cf6 Make use of `pep` instead of `pubsub` in GeoLocationManager
This mini assignment kicked-off with replacing `pubsub` with `pep`,
but later transformed into something more.

The alterations and additions in this commit:
 a) GeoLocation.
    1) Add Documentation.
    2) Add `EMPTY_GEO_LOCATION` to be used while
       `stopPublishingGeoLocation()` is called.
 b) Add GeoLocation IntegrationTest.
 c) Add GeoLocation Listener.
 d) GeoLocationManager.
    1) Add Documentation.
    2) Replace `pubsub` with `pep`.
    3) Add methods to add-and-remove GeoLocationListeners.
    4) Enable GeoLocation by default.
 e) Add `package.info` for GeoLocation Integration Test.
2020-04-08 23:05:09 +05:30
Florian Schmaus cc636fff21 Introduce Smack's Modular Connection Architecture
This is a complete redesign of what was previously
XmppNioTcpConnection. The new architecture allows to extend an XMPP
client to server (c2s) connection with new transport bindings and
other extensions.
2020-04-04 13:03:31 +02:00
Florian Schmaus eb4c2c5572 s/occured/occurred/ 2019-10-30 12:02:36 +01:00
Florian Schmaus e2d206e741 Introduce XMPPConnection.add(Message|Presence)Interceptor
add deprecate addStanzaInterceptor().
2019-10-25 21:41:55 +02:00
Florian Schmaus 5db6191110 Introduce StanzaBuilder
As first step to immutable Stanza types.
2019-10-25 21:41:55 +02:00
adiaholic 260c5539b5 Add support for XEP-0118: UserTune
This commit will enable user to communicate
information about music to which user is listening.
This feature is less of a requirement and more like fun to me.
An attempt at solving SMACK-257.

Incase you see any chances of improvement,
please let me know :)
2019-10-17 12:24:30 +02:00
Florian Schmaus e23babf147 Add Stanza.setNewStanzaId() and ensureStanzaIdSet()
Also deprecate setStanzaId() since it was not clear if this would
create a new stanza ID or just ensure that one is set.
2019-10-05 23:16:15 +02:00
Florian Schmaus 2f667f95a8 gradle: Remove archives configuration
and FileTestUtil in favor of commons-io. This is required because
Eclipse won't put src/test code into the classpath of src/main
code (even though gradle was configured with an according
dependency).
2019-09-16 00:04:47 +02:00
Florian Schmaus 75625283ef Make "duplicate" package-info.java files symbolic links
This is needed for javadocAll since otherwhise there will be

smack-core/src/main/java/org/jivesoftware/smack/package-info.java:21:
	warning: a package-info.java file has already been seen for
	package org.jivesoftware.smack

warnings.
2019-09-01 23:13:20 +02:00
Florian Schmaus 1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus 9923268391 Remove LOCK in OmemoManager and use Manager instance instead 2019-08-06 12:48:31 +02:00