Author: gstein
Date: Wed Jul 13 03:56:24 2011
New Revision: 1145852

URL: http://svn.apache.org/viewvc?rev=1145852&view=rev
Log:
Start describing how the new "paused" feature in ra_serf will be tested.

* notes/ra-serf-testing.txt: new file

* subversion/libsvn_ra_serf/util.c: leave a reference comment

Added:
    subversion/trunk/notes/ra-serf-testing.txt
Modified:
    subversion/trunk/subversion/libsvn_ra_serf/util.c

Added: subversion/trunk/notes/ra-serf-testing.txt
URL: 
http://svn.apache.org/viewvc/subversion/trunk/notes/ra-serf-testing.txt?rev=1145852&view=auto
==============================================================================
--- subversion/trunk/notes/ra-serf-testing.txt (added)
+++ subversion/trunk/notes/ra-serf-testing.txt Wed Jul 13 03:56:24 2011
@@ -0,0 +1,57 @@
+For the 1.7 release, ra_serf grew a new internal feature to "pause"
+the parsing of (large) XML response bodies. This file intends to
+document the strategy for testing this new feature.
+
+[ We've simply shipped more invasive and difficult code before.
+  However, due to the current attempts to stabilize, and the near-ness
+  of our 1.7.x branch... it seems warranted to apply a bit of
+  testing.  ]
+
+
+RAW NOTES (from some earlier thinking)
+/* Testing strategy for the PAUSED feature:
+
+   It may be possible to arrange for writing a white box test, but I'll
+   leave that to somebody with a more masochistic bent. This section will
+   outline the different scenarios to test, and then how we can adjust
+   the various control parameters to make that happen.
+
+   There are seven states to the PENDING structure:
+
+     1) pending == NULL
+     2) pending->head == NULL && pending->spill == NULL
+        (this should only happen when some data has been placed into the
+         pending membuf structure, then emptied)
+     3) pending->head != NULL && pending->spill == NULL
+     4) pending->head != NULL && pending->spill != NULL. content in file
+     5) pending->head != NULL && pending->spill != NULL. no content in file
+     6) pending->head == NULL && pending->spill != NULL. content in file
+     7) pending->head == NULL && pending->spill != NULL. nocontent in file
+
+   Most of the above states are doubled, based on the PAUSED flag.
+
+   There are two operations that occur:
+
+     1) network content arrives
+     2) process content from the pending structures
+
+   These combine into the following test scenarios to exercise the two
+   actions against each of the ten data states.
+
+     1) REPORT completes with no pausing
+     2) REPORT requires in-memory (only) buffering:
+        a) buffer empties while network content arrives again
+        b) network content completes while buffer has content
+        c) buffer empties, then later needs buffering again
+        d) partial in-mem consumption, new content lands into membuf
+     3) REPORT requires on-disk buffering:
+        a) diskbuf empties while network content arrives again
+        b) network content completes while diskbuf has content
+        c) diskbuf empties, then more buffering is needed again
+           (note: due to the code, this will go onto the disk rather
+            than back to the in-mem buffer)
+        d) partial in-mem consumption, new content lands in diskbuf
+        e) partial diskbuf consumption, new content lands in diskbuf
+
+   
+*/

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1145852&r1=1145851&r2=1145852&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Jul 13 03:56:24 2011
@@ -102,6 +102,9 @@ struct svn_ra_serf__pending_t {
    into a temporary file.  */
 #define SPILL_SIZE 1000000
 
+/* See notes/ra-serf-testing.txt for some information on testing this
+   new "paused" feature.  */
+
 
 
 static const apr_uint32_t serf_failure_map[][2] =


Reply via email to