Commit Graph

116 Commits

Author SHA1 Message Date
Florian Schmaus 1e666197a3 [sinttest] Display Java version on startup 2023-12-07 11:20:37 +01:00
Florian Schmaus 688c06020b [sinttest] Improve message ouf XmppConnectionStressTest 2023-12-06 20:55:02 +01:00
Florian Schmaus 7fcc8a9bd3 [sinttest] Set default timeout to 47 seconds
Using 60 seconds makes it sometimes easy to miss that the some action
was 1 minute after the timeout, because only a single digit in the
timestamp changes. Using a prime number as timeout makes this more
obvious.
2023-12-06 20:53:23 +01:00
Florian Schmaus 9203907e66
Merge pull request #567 from guusdk/sint_trim-config
[sinttest] Trim externally-provided configuration
2023-11-26 17:12:39 +00:00
Florian Schmaus 472bee8497 [sinttest] drop empty line 2023-11-26 13:58:09 +01:00
Florian Schmaus 915626123d [sinttest] Fix IBR-based account registration
When performing IBR-based account registration, we do not need to
login nor are the admin credentials typically available.

Suggested-by: Guus der Kinderen <guus@goodbytes.nl>
2023-11-26 13:55:35 +01:00
Guus der Kinderen 9055878748 [sinttest] Fix typos in log and exception messages 2023-11-25 20:08:51 +01:00
Guus der Kinderen 92d4cf5c77 [sinttest] Trim externally-provided configuration
Smack integration test configuration is provided externally. Guard against accidental whitespace inclusion by trimming values.
2023-09-29 20:37:03 +02:00
Florian Schmaus 24782558d6 [sinttest] Properly handle AbstractSmackSpecificLowLevelIntegrationTest
Subclasses of AbstractSmackSpecificLowLevelIntegrationTest have test
methods with no parameters. This was, after the refactoring in
c5bb15c631 ("[sinttest] Add UnconnectedConnectionSource for
low-level tests") not handled properly.

Fixes: c5bb15c631 ("[sinttest] Add UnconnectedConnectionSource for low-level tests")
2023-03-17 20:28:14 +01:00
Florian Schmaus c5bb15c631 [sinttest] Add UnconnectedConnectionSource for low-level tests
Previously low-level tests where run, potentially multiple times, with
the default connection descriptor.

Reported-by: Guus der Kinderen <guus@goodbytes.nl>
2023-02-11 13:02:23 +01:00
Florian Schmaus c9a9982cef Migrate markdown documentation to javadoc
While markdown is easier to write, Smack's markdown documentation was
never tightly coupled with the source. For example, the markdown
documentation never provided links to the actual Java classes and
methods. This poses the risk that the documentation and the code
diverge over time. Furthermore, javadoc is constantly improving (for
example @snippet annotations) and I expect that one will be able to
write javadoc in markdown.

Fixes SMACK-928.
2023-02-03 09:50:35 +01:00
Florian Schmaus 10a2687ff1 [sinttest] Allow the selection of individual test *methods* 2021-12-13 21:08:45 +01:00
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 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 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