commit eee3e581ae580cc0fa1d9eaaafb9e8efadd51d00
Author: Jim Meyering <meyering(a)redhat.com>
Date: Fri Jun 10 17:03:50 2011 +0200
t/basic: add a query-test
t/basic | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/t/basic b/t/basic
index 800c08d..ccfc54d 100644
--- a/t/basic
+++ b/t/basic
@@ -164,6 +164,17 @@ tr -s '\t \n' ' ' < q.xml > k && mv k
q.xml
printf '[ { "bucket": "b99", "key": "my_file"
} ] ' > exp.xml
compare q.xml exp.xml || fail=1
+# Run a query that produces nontrivial output by creating many
+# objects that match:
+for i in $(seq 500); do
+ obj=http://localhost:$port/b99/99999999999999999999-$i
+ echo x | curl -T - $obj
+ printf mock | curl -T - $obj/target
+done
+curl -H 'Accept: */json' -d '$target=="mock"' \
+
http://localhost:$port/b99/_query > q
+cat q
+
# Before 2011-02-07, this would cause iwhd to hang.
printf hang | curl -T -
http://localhost:$port/no-such/fff