Commit Graph

91 Commits

Author SHA1 Message Date
Florian Schmaus 69a55aaa84 [sinttest] Evaluate compatibilityMode property 2021-12-13 21:04:32 +01:00
Florian Schmaus def7c91e6a [sinttest] Introduce dirty hack in performActionAndWaitForPresence() 2021-12-13 21:03:40 +01:00
Florian Schmaus f611941dcf
Merge pull request #480 from guusdk/sint_improve-notinroster
[sint] increase stability
2021-11-04 09:46:18 +01:00
Florian Schmaus a0b9279441 [sinttest] Add "compatibility mode" setting 2021-08-22 16:16:03 +02:00
Florian Schmaus f64288ba6d [sinttest] Treat NPE as test failure not as abort condition 2021-07-16 08:56:48 +02:00
Guus der Kinderen 5e203086b3 [sint] increase stability
Some roster-based tests depend on there not being any prior subscription state beteween entities. The utility method that
tries to guarantee that, acts on the state of the roster that's cached in memory, but acts on the one that's stored on the
server. This occasionally causes issues, as both representations might be different.

Stability is added in this commit by:
- refreshing the roster from the server prior to evaluating it
- ignoring an 'item-not-found' as returned by the server, when the code tries to remove that item.
2021-06-25 16:08:31 +02:00
Florian Schmaus 138725a22f [sinttest] Log testPackages to ISE's message
This means we the reason for the LOGGER.info() call is now gone.
2021-04-05 15:02:58 +02:00
Florian Schmaus c484b72fb7 [sinttest] Fix buildWebsocketDescriptor() 2021-04-01 17:22:23 +02:00
Florian Schmaus 0c4b5d3ff9 [sinttest] Log if sinttest packages are provided via command line 2021-04-01 17:22:06 +02: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 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
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
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 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 5bfe789e08 [sinttest] Add unreliable workaround for XEP-0030 based operations 2020-05-22 15:44:23 +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 aea95d3401 sinttest: also check for length of subdescriptions varargs 2020-04-13 20:46:59 +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 a564620383 sinttest: add 'dnsResolver' setting 2020-04-07 20:59:32 +02:00
Florian Schmaus 3b27eb520f sinttest: Use Thread.sleep(15) instead of Thread.yield()
Guus reports that the entity caps sinttest fails on openfire with an
timeout exception on Java 11. Very well possible that this is caused
by a changed scheduling behavior where the yield() thread nevertheless
dominates the, potential single, core.

The waitUntilThread() method is essentially a broken approach anyway
and should be replaced in the future.
2020-04-07 16:58:21 +02:00
Florian Schmaus 0cbbac90bc sinttest: use StringUtils.appendTo(Collection, StringBuilder) 2020-04-04 13:03:45 +02:00
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 39a833166a Add workaround for truststores in JKS format when using Java >= 9 2020-03-13 16:40:46 +01:00
Florian Schmaus 1a3067c89b Enable werror for javadoc and fix javadoc issues 2019-08-30 12:08:30 +02:00
Florian Schmaus 4ca2c7cc69 Enable MissingJavadocPackage and UnnecessaryParentheses checkstyle checks 2019-07-24 09:18:39 +02:00
Greg Thomas 07c069e1a1 Use the default integration test packages if the supplied list is empty 2019-05-08 15:10:03 +02:00
Florian Schmaus 4133eb175c Replace XPP3 by XmlPullParser interface wrapping StAX and XPP3
Introducing Smack's own XmlPullParser interface which tries to stay as
compatible as possible to XPP3. The interface is used to either wrap
StAX's XMLStreamReader if Smack is used on Java SE, and XPP3's
XmlPullParser if Smack is used on on Android.

Fixes SMACK-591.

Also introduce JUnit 5 and non-strict javadoc projects.
2019-05-06 22:10:50 +02:00
Guus der Kinderen a9673408cc Admin should be disconnected after tests.
The Smack Integration tests can use an admin account to provision
accounts that are used by the tests. This admin account uses an XMPP
connection to interact with the server-under-test.

When the tests are over, this account should be disconnected
explicitly, to prevent stream management from keeping it alive longer
than it needs to.
2019-04-08 16:10:29 +02:00
Florian Schmaus c31e93a00f Improve IntegrationTestRosterUtil.ensureSubscribedto()
Improve the names of the arguments and variables. And ensure that all
listeners are removed at the end.
2019-03-16 21:12:05 +01:00
Guus der Kinderen 4d3fde4b38
To many s'ses 2019-02-14 10:37:53 +01:00
Florian Schmaus 658fd08d20 Use try-with-resources where possible
and make StanzaCollector implement AutoCloseable.
2019-02-05 13:18:03 +01:00
Florian Schmaus e98d42790a SmackReactor/NIO, Java8/Android19, Pretty print XML, FSM connections
This commit adds
- SmackReactor / NIO
- a framework for finite state machine connections
- support for Java 8
- pretty printed XML debug output

It also
- reworks the integration test framework
- raises the minimum Android API level to 19
- introduces XmppNioTcpConnection

Furthermore fixes SMACK-801 (at least partly). Java 8 language
features are available, but not all runtime library methods. For that
we would need to raise the Android API level to 24 or higher.
2019-02-05 13:18:03 +01:00
Florian Schmaus 77f466560b Sinttest: Always record why test class could not be constructed 2018-12-27 14:40:25 +01:00
Florian Schmaus b705355e3d Add IntegrationTestRosterUtil 2018-11-11 17:10:40 +01:00
Florian Schmaus b7ea226c56 Bump "Error Prone" to 2.3.2
and gradle-errorprone-plugin to 0.6.
2018-10-31 16:06:31 +01:00
Paul Schaub 74bebc13e6
requireNotNullOrEmpty -> requireNotNullNorEmpty 2018-07-17 15:10:39 +02:00
Florian Schmaus e8923b9d16 Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
2018-05-09 23:26:39 +02:00
Florian Schmaus f4f072c4cb Create sinntest configuration to connection configuration method
This also fixes the bug that only low level integration tests handled
the debugger sinttest setting.
2018-05-09 18:10:11 +02:00
Florian Schmaus b5209f4701 Enable RedundantModifier checkstyle check 2018-03-28 14:02:21 +02:00
Florian Schmaus 0602ae064a Remove deprecated methods from XMPPConnection 2017-08-12 13:36:47 +02:00
Florian Schmaus b8ee8d808f Rework Smack debugger.
Also fixes SMACK-728.
2017-07-28 12:01:11 +02:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00