summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-04-22 10:25:42 +0100
committerColin Guthrie <colin@mageia.org>2011-04-23 18:23:38 +0100
commitb620e322894a3dbf5c59ffb55df4e221d169c510 (patch)
tree472a9e86974037f52d92483fab88d944ac6a28a0
parent9ade504d4582b24e266a8f5585e3b1951d8e12b2 (diff)
test: Make the connect-stress less likely to bail out due to >32 streams.
When running two connect-stress tests at the same time the liklihood of >32 streams per sink increases. All it takes is for an event sound to fire to trigger an abort of the test. This leaves just a little bit of wriggle room for a couple external streams. Of course the overall problem is still there but this just makes it slightly less likely without really affecting the test itself.
-rw-r--r--src/tests/connect-stress.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tests/connect-stress.c b/src/tests/connect-stress.c
index f427195a..5476675a 100644
--- a/src/tests/connect-stress.c
+++ b/src/tests/connect-stress.c
@@ -32,7 +32,15 @@
#include <pulse/pulseaudio.h>
#include <pulse/mainloop.h>
-#define NSTREAMS 16
+#include <pulsecore/sink.h>
+
+/* Set the number of streams such that it allows two simultaneous instances of
+ * connect-stress to be run and not go above the max limit for streams-per-sink.
+ * This leaves enough room for a couple other streams from regular system usage,
+ * which makes a non-error abort less likely (although still easily possible of
+ * playing >=3 streams outside of the test - including internal loopback, rtp,
+ * combine, remap streams etc.) */
+#define NSTREAMS ((PA_MAX_INPUTS_PER_SINK/2) - 1)
#define NTESTS 1000
#define SAMPLE_HZ 44100