1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-05 19:55:59 +01:00
Commit graph

55 commits

Author SHA1 Message Date
Florian Schmaus
b3ed9bc29f Add BooleansUtils 2019-02-17 18:21:57 +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
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
e86700b040 Add OMEMO support
This commit adds the modules smack-omemo and smack-omemo-signal.
smack-omemo is licensed under the Apache license like the rest of the smack project.
smack-omemo-signal on the other hand is licensed under the GPLv3.
Due to the fact, that smack-omemo is not of much use without smack-omemo-signal,
the OMEMO feature can currently only be used by GPLv3 compatible software.
This may change in the future, when a more permissively licensed module becomes available.

Fixes SMACK-743.
2017-06-02 13:40:10 +02:00
Florian Schmaus
ce1cddc722 More checkstyle whitespace related checks 2017-05-24 14:42:38 +02:00
Florian Schmaus
76adf22ba1 Add missing break statement to deleteViaServiceAdministration()
in IntTestUtil.
2017-03-18 19:19:48 +01:00
Florian Schmaus
09b6608a3a Fix and improve the HTTP File Upload implementation
Fix a few resource leaks. Improve the API and add an integration
test. Also add compability layer for XEP-0363: HTTP File Upload 0.2.

SMACK-747
2017-03-10 17:54:29 +01:00
Florian Schmaus
7c46f58c80 Rename "PacketReplyTimeout" → "ReplyTimeout" 2017-01-12 20:57:19 +01:00
Florian Schmaus
90a5e289f8 s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/ 2017-01-03 11:35:04 +01:00
Florian Schmaus
7655ac17f2 Re-activate EntityCaps integration test 2016-12-24 10:27:04 +01:00
Florian Schmaus
ca394838f0 Make sinttest (Before|After)Class methods non-static 2016-12-23 23:42:47 +01:00
Florian Schmaus
01169a956c Log when executing (Before|After) class sinttest methods 2016-12-23 23:42:47 +01:00
Florian Schmaus
e27e416063 Fix sinttest log string: s/AfterClass/BeforeClass/ 2016-12-23 23:42:47 +01:00
Florian Schmaus
814cc1fdde Create low-level inttest accounts with test run ID 2016-12-19 18:11:19 +01:00
Florian Schmaus
8511a9e67b Fix deadline check
The pattern

if (now > deadline) break;
wait(deadline - now);

is insufficient in case "now == deadline" because the result would be
wait() being called with 0, which would mean "wait until
notified". Thus, the timeout would become infinite.
2016-12-19 16:29:16 +01:00
Florian Schmaus
cfe5c2233d Fix integration test using XEP-0133 credentials
for the created connections.
2016-12-19 14:13:53 +01:00
Florian Schmaus
274e5630c4 Add support for XEP-0133: Service Administration
also extend Smack's integration test framework to use XEP-0133 as a
means for of throw away account creation.

Fixes SMACK-742
2016-12-04 21:42:50 +01:00
Florian Schmaus
8810f17460 Allow empty username/passwords in integration test 2016-07-31 14:50:59 +02:00
Florian Schmaus
b91978dcc4 Add (partial) support for IoT XEPs
That is XEP-0323, -0324, -0325, and -0347.

SMACK-727.
2016-07-21 08:51:11 +02:00
Florian Schmaus
d07ed60737 Add support for "Caps Optimizations"
Smack's previous entity caps implementation assumed that an entity lost
its entity caps feature as soon as a presence without caps from that
entity was received. But according to XEP-0115 § 8.4, this is a
perfectly normal optimization technique. We now reset the caps state
after an available presence becomes unavailable.

Also introduce PresenceEventListener, which is required for this
feature.

Also make Roster.preApprove() take a BareJid as argument.

Fixes SMACK-723.
2016-06-30 17:01:46 +02:00
Florian Schmaus
4248fbbb89 Use lowercase chars in integration testRunId 2016-06-29 08:08:13 +02:00
Florian Schmaus
4c18814b12 sinttest: Throw exception if service is not set 2016-06-08 23:05:44 +02:00
Florian Schmaus
92968e1630 Use java-pinning-java7 for the integration tests
to avoid "Certificates does not conform to algorithm constraints" when
using certain cert chains (e.g CACert).
2016-04-14 22:59:22 +02:00
Florian Schmaus
658a671cbe Make StringUtils.randomString(int) use SecureRandom 2016-01-10 18:21:46 +01:00
Florian Schmaus
d728204890 Add errorprone check and fix found errors
Adds gradle-errorprone-plugin 0.0.8, requires Gradle 2.6.
2015-09-13 18:12:33 +02:00
Florian Schmaus
7b1b20a13c Use Localpart in AccountManager 2015-08-20 19:01:33 +02:00
Florian Schmaus
d49fadd466 Log integeration testType also 2015-06-13 19:23:36 +02:00
Florian Schmaus
ffea35282c Don't make NotConnectedException fatal
If such an exception ever happes when running a integration, then the
framework should not abort, but instead log the exception so that other
information is also logged.
2015-06-09 22:16:41 +02:00
Florian Schmaus
b9782aa6bc Handle junit's AssertionError in integration tests 2015-06-09 22:16:23 +02:00
Florian Schmaus
bad52fad21 Deprecate setServiceName in favor of setXmppDomain 2015-06-08 14:42:05 +02:00
Florian Schmaus
8840236b72 Gracefully disconnect XMPPTCPConnection
That is, wait with a timeout for a closing stream element if we have
sent a closing stream element to the server. See RFC 6120 § 4.4.

Fixes SMACK-633.
2015-05-27 17:36:04 +02:00
Florian Schmaus
2365c4c208 Add Roster.addSubscribeListener()
Remove unnecessary 'Unsubscribe' case in Roster: It is not required to
acknowledge these.
2015-05-21 22:41:21 +02:00
Florian Schmaus
c7454ce968 Remove unnecessary cast 2015-04-24 21:33:23 +02:00
Florian Schmaus
221b81a627 Delete accounts created by LowLevelIntegrationTest performCheck()
those where created but not deleted.
2015-04-24 21:33:20 +02:00
Florian Schmaus
0efdc4018f Use XMPPConnection.toString() in SmackIntegrationTestFramework 2015-04-22 22:31:58 +02:00
Florian Schmaus
7c3f4b7129 Add AbstractXMPPConnection.toString() 2015-04-22 09:28:30 +02:00
Florian Schmaus
bfb3f5cd95 Retry to delete integration test accounts
in the the connection was terminated because of an error, try to
re-establish the connection when trying to delete the account.
2015-04-22 09:23:22 +02:00
Florian Schmaus
b4694ec152 Add FinalClass checkstyle check
And mark affected classes final.
2015-04-06 10:45:12 +02:00
Florian Schmaus
38dc59eb8e Fix assert in TestResult
sometimes the unit test where failing because the assert '>' didn't
hold. Use '>=' instead now.
2015-04-05 10:49:14 +02:00