fix(moxxmpp): Somewhat fix (and break) moxxmpp_socket_tcp integration tests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user