fi
shopt -u extglob
}
+
+function trace_until_n_archives ()
+{
+ local produce_events=$1
+ local trace_path=$2
+ local target_archive_count=$3
+ local archive_count=0
+
+ diag "Waiting for $target_archive_count size-based rotations to occur"
+ while [[ archive_count -lt $target_archive_count ]]
+ do
+ archive_count=$(find "$trace_path" -mindepth 2 -maxdepth 2 -type d -path "*archives*" | wc -l)
+ $produce_events 2000
+ done
+
+ [[ $archive_count -eq $target_archive_count ]]
+ ok $? "Found $target_archive_count trace archives resulting from trace archive rotations"
+}