<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[12544] CalDAVTester/trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/12544">12544</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-02-03 13:30:41 -0800 (Mon, 03 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make wait count and delay configurable.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalDAVTestertrunkREADMEtxt">CalDAVTester/trunk/README.txt</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfopodxml">CalDAVTester/trunk/scripts/server/serverinfo-pod.xml</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfotemplatexml">CalDAVTester/trunk/scripts/server/serverinfo-template.xml</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfodtd">CalDAVTester/trunk/scripts/server/serverinfo.dtd</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfoxml">CalDAVTester/trunk/scripts/server/serverinfo.xml</a></li>
<li><a href="#CalDAVTestertrunksrccaldavtestpy">CalDAVTester/trunk/src/caldavtest.py</a></li>
<li><a href="#CalDAVTestertrunksrcserverinfopy">CalDAVTester/trunk/src/serverinfo.py</a></li>
<li><a href="#CalDAVTestertrunksrcxmlDefspy">CalDAVTester/trunk/src/xmlDefs.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalDAVTestertrunkREADMEtxt"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/README.txt (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/README.txt        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/README.txt        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -92,7 +92,15 @@
</span><span class="cx">         ELEMENT <authtype>
</span><span class="cx">                 HTTP authentication method to use.
</span><span class="cx">
</span><del>-        ELEMENT <waittime>
</del><ins>+        ELEMENT <waitcount>
+                For requests that wait, defines how many iterations to wait for
+                [Default: 120].
+
+        ELEMENT <waitdelay>
+                For requests that wait, defines how long between iterations to
+                wait for in seconds [Default: 0.25].
+
+        ELEMENT <waitsuccess>
</ins><span class="cx">                 For requests with the wait-for-success options, defines how many
</span><span class="cx">                 seconds to wait [Default: 10].
</span><span class="cx">
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfopodxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo-pod.xml (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo-pod.xml        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/scripts/server/serverinfo-pod.xml        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -28,6 +28,9 @@
</span><span class="cx">         <sslport2>8543</sslport2>
</span><span class="cx">
</span><span class="cx">         <authtype>basic</authtype>
</span><ins>+        
+        <waitcount>120</waitcount>
+        <waitdelay>0.25</waitdelay>
</ins><span class="cx">
</span><span class="cx">         <features>
</span><span class="cx">                 <!-- Generic WebDAV extensions -->
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfotemplatexml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx">         <nonsslport>%(nonsslport)s</nonsslport>
</span><span class="cx">         <sslport>%(sslport)s</sslport>
</span><span class="cx">         <authtype>%(authtype)s</authtype>
</span><ins>+        
+        <waitcount>120</waitcount>
+        <waitdelay>0.25</waitdelay>
</ins><span class="cx">
</span><span class="cx">         <features>
</span><span class="cx">                 <!-- Generic WebDAV extensions -->
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfodtd"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo.dtd (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo.dtd        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/scripts/server/serverinfo.dtd        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -14,7 +14,8 @@
</span><span class="cx"> limitations under the License.
</span><span class="cx"> -->
</span><span class="cx">
</span><del>-<!ELEMENT serverinfo (host, nonsslport, sslport, host2?, nonsslport2?, sslport2?, authtype?, waitime?, features?, substitutions)? >
</del><ins>+<!ELEMENT serverinfo (host, nonsslport, sslport, host2?, nonsslport2?, sslport2?, authtype?,
+                                                waitcount?, waitdelay?, waitsuccess?, features?, substitutions)? >
</ins><span class="cx">
</span><span class="cx">         <!ELEMENT host                        (#PCDATA)>
</span><span class="cx">         <!ELEMENT nonsslport        (#PCDATA)>
</span><span class="lines">@@ -23,7 +24,9 @@
</span><span class="cx">         <!ELEMENT nonsslport2        (#PCDATA)>
</span><span class="cx">         <!ELEMENT sslport2                (#PCDATA)>
</span><span class="cx">         <!ELEMENT authtype                (#PCDATA)>
</span><del>-        <!ELEMENT waittime (#PCDATA)>
</del><ins>+        <!ELEMENT waitdelay (#PCDATA)>
+        <!ELEMENT waitcount (#PCDATA)>
+        <!ELEMENT waitsuccess (#PCDATA)>
</ins><span class="cx">         <!ELEMENT features (feature*)>
</span><span class="cx">                 <!ELEMENT feature (#PCDATA)>
</span><span class="cx">         <!ELEMENT substitutions        (substitution|repeat)*>
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfoxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo.xml        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx">         <nonsslport>8008</nonsslport>
</span><span class="cx">         <sslport>8443</sslport>
</span><span class="cx">         <authtype>basic</authtype>
</span><ins>+        
+        <waitcount>120</waitcount>
+        <waitdelay>0.25</waitdelay>
</ins><span class="cx">
</span><span class="cx">         <features>
</span><span class="cx">                 <!-- Generic WebDAV extensions -->
</span></span></pre></div>
<a id="CalDAVTestertrunksrccaldavtestpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/caldavtest.py (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/caldavtest.py        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/src/caldavtest.py        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> reqstats = None
</span><span class="cx"> for ctr in range(test.count):
</span><span class="cx"> for req_count, req in enumerate(test.requests):
</span><del>- t = time.time() + (self.manager.server_info.wait if getattr(req, "wait_for_success", False) else 100)
</del><ins>+ t = time.time() + (self.manager.server_info.waitsuccess if getattr(req, "wait_for_success", False) else 100)
</ins><span class="cx"> while t > time.time():
</span><span class="cx"> failed = False
</span><span class="cx"> if getattr(req, "iterate_data", False):
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">
</span><span class="cx"> def dowaitcount(self, collection, count, label=""):
</span><span class="cx">
</span><del>- for _ignore in range(120):
</del><ins>+ for _ignore in range(self.manager.server_info.waitcount):
</ins><span class="cx"> req = request(self.manager)
</span><span class="cx"> req.method = "PROPFIND"
</span><span class="cx"> req.ruris.append(collection[0])
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx">
</span><span class="cx"> if ctr - 1 == count:
</span><span class="cx"> return True
</span><del>- delay = 0.25
</del><ins>+ delay = self.manager.server_info.waitdelay
</ins><span class="cx"> starttime = time.time()
</span><span class="cx"> while (time.time() < starttime + delay):
</span><span class="cx"> pass
</span><span class="lines">@@ -434,7 +434,7 @@
</span><span class="cx">
</span><span class="cx"> def dowaitchanged(self, uri, etag, user, pswd, label=""):
</span><span class="cx">
</span><del>- for _ignore in range(120):
</del><ins>+ for _ignore in range(self.manager.server_info.waitcount):
</ins><span class="cx"> req = request(self.manager)
</span><span class="cx"> req.method = "HEAD"
</span><span class="cx"> req.ruris.append(uri)
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx"> break
</span><span class="cx"> else:
</span><span class="cx"> return False
</span><del>- delay = 0.25
</del><ins>+ delay = self.manager.server_info.waitdelay
</ins><span class="cx"> starttime = time.time()
</span><span class="cx"> while (time.time() < starttime + delay):
</span><span class="cx"> pass
</span></span></pre></div>
<a id="CalDAVTestertrunksrcserverinfopy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/serverinfo.py (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/serverinfo.py        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/src/serverinfo.py        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -37,7 +37,9 @@
</span><span class="cx"> self.features = set()
</span><span class="cx"> self.user = ""
</span><span class="cx"> self.pswd = ""
</span><del>- self.wait = 10
</del><ins>+ self.waitcount = 120
+ self.waitdelay = 0.25
+ self.waitsuccess = 10
</ins><span class="cx"> self.subsdict = {}
</span><span class="cx"> self.extrasubsdict = {}
</span><span class="cx">
</span><span class="lines">@@ -145,8 +147,12 @@
</span><span class="cx"> self.sslport2 = int(child.text)
</span><span class="cx"> elif child.tag == src.xmlDefs.ELEMENT_AUTHTYPE:
</span><span class="cx"> self.authtype = child.text.encode("utf-8")
</span><del>- elif child.tag == src.xmlDefs.ELEMENT_WAITTIME:
- self.wait = int(child.text.encode("utf-8"))
</del><ins>+ elif child.tag == src.xmlDefs.ELEMENT_WAITCOUNT:
+ self.waitcount = int(child.text.encode("utf-8"))
+ elif child.tag == src.xmlDefs.ELEMENT_WAITDELAY:
+ self.waitdelay = float(child.text.encode("utf-8"))
+ elif child.tag == src.xmlDefs.ELEMENT_WAITSUCCESS:
+ self.waitsuccess = int(child.text.encode("utf-8"))
</ins><span class="cx"> elif child.tag == src.xmlDefs.ELEMENT_FEATURES:
</span><span class="cx"> self.parseFeatures(child)
</span><span class="cx"> elif child.tag == src.xmlDefs.ELEMENT_SUBSTITUTIONS:
</span></span></pre></div>
<a id="CalDAVTestertrunksrcxmlDefspy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/src/xmlDefs.py (12543 => 12544)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/src/xmlDefs.py        2014-02-03 19:52:23 UTC (rev 12543)
+++ CalDAVTester/trunk/src/xmlDefs.py        2014-02-03 21:30:41 UTC (rev 12544)
</span><span class="lines">@@ -75,7 +75,9 @@
</span><span class="cx"> ELEMENT_VALUE = "value"
</span><span class="cx"> ELEMENT_VARIABLE = "variable"
</span><span class="cx"> ELEMENT_VERIFY = "verify"
</span><del>-ELEMENT_WAITTIME = "waittime"
</del><ins>+ELEMENT_WAITCOUNT = "waitcount"
+ELEMENT_WAITDELAY = "waitdelay"
+ELEMENT_WAITSUCCESS = "waitsuccess"
</ins><span class="cx"> ELEMENT_WARNINGTIME = "warningtime"
</span><span class="cx">
</span><span class="cx"> ATTR_HOST2 = "host2"
</span></span></pre>
</div>
</div>
</body>
</html>