From: Ondřej Kuzník Date: Mon, 31 Oct 2022 09:26:12 +0000 (+0000) Subject: ITS#9598 Do not track olcIncomingConnections in lloadd/test007 X-Git-Tag: OPENLDAP_REL_ENG_2_6_4~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9d76ccf02b7101b8519244e295b12a5b5642229;p=thirdparty%2Fopenldap.git ITS#9598 Do not track olcIncomingConnections in lloadd/test007 Some values we export in cn=monitor are not managed in a single place, instead, a task exists that gathers a snapshot of the lloadd state and stores it for monitor consumption. This exposes a race between the test reading it out and lloadd updating this cached copy. While we still have to rely on a shell, rather than being intelligent about whether or not we should emit a readout into search.out or wait and try again (which is what test004-monitor does), just filter this attribute out. --- diff --git a/tests/data/lloadd/test007-monitor.ldif b/tests/data/lloadd/test007-monitor.ldif index 52c2c966e9..eb8deaee21 100644 --- a/tests/data/lloadd/test007-monitor.ldif +++ b/tests/data/lloadd/test007-monitor.ldif @@ -1,7 +1,6 @@ # with first backend dn: cn=Load Balancer,cn=Backends,cn=Monitor objectClass: olmBalancer -olmIncomingConnections: 0 olmOutgoingConnections: 4 dn: cn=Incoming Connections,cn=Load Balancer,cn=Backends,cn=Monitor @@ -87,7 +86,6 @@ olmFailedOps: 0 # second backend and a rejected search, paged search (19 times x 1 entry), pwmod dn: cn=Load Balancer,cn=Backends,cn=Monitor objectClass: olmBalancer -olmIncomingConnections: 0 olmOutgoingConnections: 13 dn: cn=Incoming Connections,cn=Load Balancer,cn=Backends,cn=Monitor @@ -274,7 +272,6 @@ olmFailedOps: 0 # two runs of modifies (with and without TXN) dn: cn=Load Balancer,cn=Backends,cn=Monitor objectClass: olmBalancer -olmIncomingConnections: 0 olmOutgoingConnections: 13 dn: cn=Incoming Connections,cn=Load Balancer,cn=Backends,cn=Monitor diff --git a/tests/scripts/lloadd/test007-coherence b/tests/scripts/lloadd/test007-coherence index a78d8e7ef2..b571841d35 100755 --- a/tests/scripts/lloadd/test007-coherence +++ b/tests/scripts/lloadd/test007-coherence @@ -483,7 +483,10 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$DATADIR/lloadd/test007-monitor.ldif echo "Filtering ldapsearch results..." -$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +# For now, we don't make sure olmIncomingConnections is reflective of current +# state (=no connections open) since olmIncomingConnections can be != 0 for a +# second after it's closed +$LDIFFILTER < $SEARCHOUT | grep -v '^olmIncomingConnections:' > $SEARCHFLT echo "Filtering original ldif used to create database..." $LDIFFILTER < $LDIF | sed \ -e "s|@URI2@|$URI2|g" \