quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test1542 (1219B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 connection reuse
      6 persistent connection
      7 CURLOPT_MAXLIFETIME_CONN
      8 verbose logs
      9 </keywords>
     10 </info>
     11 
     12 # Server-side
     13 <reply>
     14 <data nocheck="yes">
     15 HTTP/1.1 200 OK
     16 Content-Length: 0
     17 
     18 </data>
     19 </reply>
     20 
     21 # Client-side
     22 <client>
     23 <server>
     24 http
     25 </server>
     26 <tool>
     27 lib%TESTNUMBER
     28 </tool>
     29 <name>
     30 connection reuse with CURLOPT_MAXLIFETIME_CONN
     31 </name>
     32 <command>
     33 http://%HOSTIP:%HTTPPORT/%TESTNUMBER
     34 </command>
     35 </client>
     36 
     37 # Verify data after the test has been "shot"
     38 <verify>
     39 <protocol>
     40 GET /%TESTNUMBER HTTP/1.1
     41 Host: %HOSTIP:%HTTPPORT
     42 Accept: */*
     43 
     44 GET /%TESTNUMBER HTTP/1.1
     45 Host: %HOSTIP:%HTTPPORT
     46 Accept: */*
     47 
     48 GET /%TESTNUMBER HTTP/1.1
     49 Host: %HOSTIP:%HTTPPORT
     50 Accept: */*
     51 
     52 GET /%TESTNUMBER HTTP/1.1
     53 Host: %HOSTIP:%HTTPPORT
     54 Accept: */*
     55 
     56 </protocol>
     57 <file name="%LOGDIR/stderr%TESTNUMBER" mode="text">
     58 == Info: Connection #0 to host %HOSTIP left intact
     59 == Info: Connection #0 to host %HOSTIP left intact
     60 == Info: Connection #0 to host %HOSTIP left intact
     61 == Info: shutting down connection #0
     62 == Info: Connection #1 to host %HOSTIP left intact
     63 </file>
     64 <stripfile>
     65 $_ = '' if(($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
     66 </stripfile>
     67 </verify>
     68 </testcase>