1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-16 20:22:05 +01:00
Commit graph

224 commits

Author SHA1 Message Date
Florian Schmaus
0c4b5d3ff9 [sinttest] Log if sinttest packages are provided via command line 2021-04-01 17:22:06 +02:00
Florian Schmaus
cd10d1b40c [sinttest] Downgrade org.refelections:reflections to 0.9.11 2021-04-01 17:21:49 +02: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
b276b89916 [sinttest] Add code comment and empty line 2021-03-18 21:32:37 +01:00
Florian Schmaus
ddf96828e4 [sinttest] Add fromMarkers array to exception message 2021-03-18 21:32:21 +01:00
Florian Schmaus
35cd1a8f88 [sinttest] Do not lazily create fromMarkers
If we do not create the fromMarkers initialized with 'false' at the
start, then it may appear like all messages are received, because we
only check for false markers. But if there is not even the fromMarkers
array, then we do not see those 'false' markers.
2021-03-18 21:32:10 +01:00
Florian Schmaus
9520aa7d90 [sinttest] Do not create myReceiveMarkers on demand 2021-03-15 19:24:19 +01:00
Florian Schmaus
11a486d84d [sinttest] Add header to NotAllMessagesReceivedException
This header maps the internal connection ID to the connection.
2021-03-15 19:22:57 +01:00
Florian Schmaus
f91598e10c [sinttest] Improve NotAllMessageReceivedException 2021-03-15 19:22:26 +01:00
Florian Schmaus
ad8eeebc0d [sinttest] Allow maxPayloadChunks == 0 2021-03-15 19:21:55 +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
Florian Schmaus
cd40455b62 [smack-integration-test] Bump reflections to 0.9.12
This also means that smack-integration-test needs to declare a
dependency on Guava, which was previously available as transitive
dependency of 'reflections' 0.9.11.
2021-02-14 18:37:44 +01:00
Florian Schmaus
a7b3303f3e Bump ErrorProne to 2.5.1 and refactor Providers a bit
This also resulted in a refactoring of the Providers and parsing
Exceptions. NumberFormatException and ParseException can now be thrown
directly, the wrapping in a SmackParsingException is down at a higher
layer, i.e. in AbstractProvider.
2021-01-29 09:26:15 +01:00
Florian Schmaus
71f5cfe3da Merge branch '4.4' 2020-11-09 11:08:47 +01:00
Florian Schmaus
1f5ada4822 Add org.jivesoftware.smack.Smack with getVersion() and ensureInitialized() 2020-11-09 08:46:57 +01:00
Florian Schmaus
5f66685949
Merge pull request #436 from guusdk/sint-use-specific-assertions
In tests, use specific assertion implementation
2020-10-27 11:57:21 +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
Guus der Kinderen
254c315852 Add missing right parenthesis in SINT output
While running the Smack integration tests, a line like this is printed to std-out somewhere

    Available tests: 21 (Disabled 12 classes and 6 tests

There's a missing character on the end of that line, which makes the author of this commit twitch.
This commit adds the missing character, resulting in a line like this:

    Available tests: 21 (Disabled 12 classes and 6 tests)
2020-10-03 15:56:06 +02:00
Florian Schmaus
9002be8e7a s/Websocket/WebSocket/
Java SE as well as OkHttp use 'WebSocket' (not 'Websocket'). Let us do
the same.

SMACK-835.
2020-09-01 21:47:36 +02:00
adiaholic
7ed29b9d5f Introduce websocket module into smack 2020-08-28 23:40:40 +05:30
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
e2a196fa52 [sinttest] Improve status output 2020-05-31 21:08:14 +02:00
Florian Schmaus
6c84356278 [sinttest] Recycle low-level test connections 2020-05-31 21:01:57 +02:00
Florian Schmaus
dd4cd8cede [sinttest] Disconnect unrecycleable connections 2020-05-31 21:01:32 +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
162651821e sinttest: log unexpected Throwables thrown by runTests()
Because we would not see those if the finally block also threw.
2020-04-15 19:48:39 +02:00
Florian Schmaus
cbc2024875 sinttest: print smack version 2020-04-14 09:20:43 +02:00
Florian Schmaus
dd248adb28 sinttest: delcare boolean in WaitForClosingStreamElementTest 2020-04-13 22:49:31 +02:00
Florian Schmaus
aea95d3401 sinttest: also check for length of subdescriptions varargs 2020-04-13 20:46:59 +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
2b41a67028 sinttest: only append subdescriptions if there are any 2020-04-12 22:21:30 +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
b5f9d4d7a3 Introduce test fixtures
This also removes the powermock dependency. Although powermock is a
fine library, it currently prevents dropping Junit4. And since we only
use the Whitebox API of powermock, this simply replaced powermock's
Whitebox with our own.
2020-04-11 22:05:36 +02:00