fix(moxxmpp): Somewhat fix (and break) moxxmpp_socket_tcp integration tests
This commit is contained in:
parent
05e3d804a4
commit
77a1acb0e7
@ -17,25 +17,15 @@ Future<void> _runTest(String domain) async {
|
||||
final connection = XmppConnection(
|
||||
TestingReconnectionPolicy(),
|
||||
AlwaysConnectedConnectivityManager(),
|
||||
ClientToServerNegotiator(),
|
||||
socket,
|
||||
)..connectionSettings = ConnectionSettings(
|
||||
jid: JID.fromString('testuser@$domain'),
|
||||
password: 'abc123',
|
||||
);
|
||||
await connection.registerFeatureNegotiators([
|
||||
StartTlsNegotiator(),
|
||||
]);
|
||||
await connection.registerManagers([
|
||||
DiscoManager([]),
|
||||
RosterManager(TestingRosterStateManager('', [])),
|
||||
MessageManager(),
|
||||
PresenceManager(),
|
||||
]);
|
||||
|
||||
connection.setConnectionSettings(
|
||||
ConnectionSettings(
|
||||
jid: JID.fromString('testuser@$domain'),
|
||||
password: 'abc123',
|
||||
useDirectTLS: true,
|
||||
),
|
||||
);
|
||||
|
||||
final result = await connection.connect(
|
||||
shouldReconnect: false,
|
||||
|
@ -18,17 +18,15 @@ void main() {
|
||||
final connection = XmppConnection(
|
||||
TestingSleepReconnectionPolicy(10),
|
||||
AlwaysConnectedConnectivityManager(),
|
||||
ClientToServerNegotiator(),
|
||||
TCPSocketWrapper(),
|
||||
)..connectionSettings = ConnectionSettings(
|
||||
jid: JID.fromString('testuser@no-sasl.badxmpp.eu'),
|
||||
password: 'abc123',
|
||||
);
|
||||
await connection.registerFeatureNegotiators([
|
||||
StartTlsNegotiator(),
|
||||
]);
|
||||
await connection.registerManagers([
|
||||
DiscoManager([]),
|
||||
RosterManager(TestingRosterStateManager('', [])),
|
||||
MessageManager(),
|
||||
PresenceManager(),
|
||||
]);
|
||||
connection.asBroadcastStream().listen((event) {
|
||||
if (event is ConnectionStateChangedEvent) {
|
||||
if (event.state == XmppConnectionState.error) {
|
||||
@ -37,14 +35,6 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
connection.setConnectionSettings(
|
||||
ConnectionSettings(
|
||||
jid: JID.fromString('testuser@no-sasl.badxmpp.eu'),
|
||||
password: 'abc123',
|
||||
useDirectTLS: true,
|
||||
),
|
||||
);
|
||||
|
||||
final result = await connection.connect(
|
||||
shouldReconnect: false,
|
||||
waitUntilLogin: true,
|
||||
@ -68,17 +58,15 @@ void main() {
|
||||
final connection = XmppConnection(
|
||||
TestingReconnectionPolicy(),
|
||||
AlwaysConnectedConnectivityManager(),
|
||||
ClientToServerNegotiator(),
|
||||
TCPSocketWrapper(),
|
||||
)..connectionSettings = ConnectionSettings(
|
||||
jid: JID.fromString('testuser@no-sasl.badxmpp.eu'),
|
||||
password: 'abc123',
|
||||
);
|
||||
await connection.registerFeatureNegotiators([
|
||||
StartTlsNegotiator(),
|
||||
]);
|
||||
await connection.registerManagers([
|
||||
DiscoManager([]),
|
||||
RosterManager(TestingRosterStateManager('', [])),
|
||||
MessageManager(),
|
||||
PresenceManager(),
|
||||
]);
|
||||
connection.asBroadcastStream().listen((event) {
|
||||
if (event is ConnectionStateChangedEvent) {
|
||||
if (event.state == XmppConnectionState.error) {
|
||||
@ -87,14 +75,6 @@ void main() {
|
||||
}
|
||||
});
|
||||
|
||||
connection.setConnectionSettings(
|
||||
ConnectionSettings(
|
||||
jid: JID.fromString('testuser@no-sasl.badxmpp.eu'),
|
||||
password: 'abc123',
|
||||
useDirectTLS: true,
|
||||
),
|
||||
);
|
||||
|
||||
final result = await connection.connect(
|
||||
shouldReconnect: false,
|
||||
waitUntilLogin: true,
|
||||
|
@ -12,7 +12,13 @@ dependencies:
|
||||
meta: ^1.6.0
|
||||
moxxmpp:
|
||||
hosted: https://git.polynom.me/api/packages/Moxxy/pub
|
||||
version: ^0.3.0
|
||||
version: ^0.4.0
|
||||
|
||||
dependency_overrides:
|
||||
moxxmpp:
|
||||
git:
|
||||
url: https://codeberg.org/moxxy/moxxmpp.git
|
||||
rev: 05e3d804a4036e9cd93fd27473a1e970fda3c3fc
|
||||
|
||||
dev_dependencies:
|
||||
lints: ^2.0.0
|
||||
|
Loading…
Reference in New Issue
Block a user