1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-16 09:12:06 +01:00
Commit graph

165 commits

Author SHA1 Message Date
Florian Schmaus
b3637101ce [sinttest] Use MultiUserChat.getMyRoomJid() in integration test 2021-12-20 22:40:55 +01:00
Florian Schmaus
56ca31b156 [sinttset] AbstractMultiUserChatIntegrationTest cleanups 2021-12-20 22:40:13 +01:00
Florian Schmaus
56c66f17d8 [sinttest] MultiUserChatEntityIntegrationTest cleanups 2021-12-20 22:39:45 +01:00
Dan Caseley
e51cf47b29 [sinttest] Additional tests for § 6 of XEP-0045
Modified-by: Florian Schmaus <flo@geekplace.eu>
2021-12-20 21:11:31 +01:00
Florian Schmaus
4e2d0035ac [sinttest] Increase 'try' block in MultiUserChatRolesAffiliations*Test
Fixes: aff6283798
2021-12-13 21:01:41 +01:00
Florian Schmaus
400a2b2564 [sinttest] Use popular desktop OS in SoftwareInfoIntegrationTest values 2021-12-13 20:51:33 +01:00
Florian Schmaus
33e8053258 [sinttest] Remove unnecessary catch in UserTuneIntegrationTest 2021-12-13 20:50:56 +01:00
Guus der Kinderen
819ed87a17 [sinttest] Wait for notification filter to propagate
The UserTuneIntegrationTest, in rapid succession:
- add a listener for PEP-published usertune data
- publishes a usertune
- waits for a notification to arrive

Implicit to adding the listener is the publication of a change in
Pubsub notification filtering. This can involve a stanza handshake,
as CAPS is involved.

A race condition exists where the usertune data can be published
before the notification filter has been properly applied.

The changes in this commit add a synchronzation point that ensures
that the notification filter is in place, before the usertune data
is published.

Co-authored-by: Paul Schaub <vanitasvitae@fsfe.org>
2021-12-12 18:13:31 +01:00
Florian Schmaus
a0b9279441 [sinttest] Add "compatibility mode" setting 2021-08-22 16:16:03 +02:00
Dan Caseley
48c057ab10 [sinttest] Additional tests for s5 of XEP-0045
Modified-by: Florian Schmaus <flo@geekplace.eu>
2021-08-22 15:29:07 +02:00
Florian Schmaus
4120b42761 [omemo] Add OmemoManager.purgeEveryting()
This is basically the already existing method from
OmemoManagerSetupHelper.cleanUpPubSub() moved over into OmemoManager
as purgeEverything().
2021-07-06 12:31:47 +02:00
Florian Schmaus
6434e77336 [sinttest] Use correct camel case in method name: s/MUC/muc/
See also https://google.github.io/styleguide/javaguide.html#s5.3-camel-case
2021-06-21 14:52:18 +02:00
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
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
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