Mercurial > prosody-modules
view mod_lib_ldap/dev/t/00-login.t @ 4442:74da3643c62d
mod_smacks: Don't ask for acks while in (csi) inactive mode
The acks count as high priority events in mod_csi_simple and since
they're sent after each stanza, it negated all optimizations.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Feb 2021 19:16:21 +0100 |
parents | 512e31cd8b70 |
children |
line wrap: on
line source
use strict; use warnings; use lib 't'; use TestConnection; use Test::More; my @users = ( 'one', 'two', 'three', 'four', 'five', 'six', ); plan tests => scalar(@users) + 3; foreach my $username (@users) { my $conn = TestConnection->new($username); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok(! $error) or diag("$username login failed: $error"); } do { my $conn = TestConnection->new('one', password => '23451'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); }; do { my $conn = TestConnection->new('invalid', password => '12345'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); }; do { my $conn = TestConnection->new('seven', password => '1234567'); $conn->reg_cb(session_ready => sub { $conn->cond->send; }); my $error = $conn->cond->recv; ok($error); };