gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] storm/org/nongnu/storm/http/client testSimpleHT...


From: Hermanni Hyytiälä
Subject: [Gzz-commits] storm/org/nongnu/storm/http/client testSimpleHT...
Date: Mon, 28 Apr 2003 03:59:39 -0400

CVSROOT:        /cvsroot/storm
Module name:    storm
Changes by:     Hermanni Hyytiälä <address@hidden>      03/04/28 03:59:39

Modified files:
        org/nongnu/storm/http/client: testSimpleHTTPClient.test 

Log message:
        Not quite yet, continue at the office

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/storm/storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test
diff -u storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test:1.2 
storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test:1.3
--- storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test:1.2    Fri Apr 
25 10:44:09 2003
+++ storm/org/nongnu/storm/http/client/testSimpleHTTPClient.test        Mon Apr 
28 03:59:39 2003
@@ -26,6 +26,11 @@
 from org.nongnu.storm.http.client import HTTPConnection
 from org.nongnu.storm.http.client import HTTPRequest
 from org.nongnu.storm.http.client import HTTPResponse
+from org.nongnu.storm.impl import TransientPool
+from org.nongnu.storm.modules.gispmap import GispP2PMap
+from org.nongnu.storm.impl.p2p import Peer
+from org.nongnu.storm.impl import DirPool
+from org.nongnu.storm.util import HTTPProxy
 
 host0 = "127.0.0.1"
 host1 = "fishy.it.jyu.fi"
@@ -33,7 +38,7 @@
 host3 = "kanetti1390.kanetti.com"
 
 port = 5555
-request = "/rewrite/urn:x-storm:1.0:text/plain,\
+request = "rewrite/urn:x-storm:1.0:text/plain,\
 dvi7nrvd36pnprsmg4x55klqnqzvfgkc.f2aagxw4lfv7smbyzpm5tpf6ypajrdvh6ndqfky"
 
 protocol1 = "HTTP/1.1"
@@ -42,11 +47,30 @@
 
 def testHTTPClient():
 
+        empty = java.util.Collections.EMPTY_SET
+        pool = DirPool(java.io.File("/home/hemppah/cvs/storm"), empty)
+        
+        #pub = TransientPool(empty)
+        #cache = TransientPool(empty)
+        #map1 = GispP2PMap("/home/hemppah/cvs/storm")    
+        #peer = Peer(pub, cache, map1)    
+        #pool = peer.getPool()
+        
+        
+        java.lang.Thread(HTTPProxy(pool, 5555)).start()
+        
+        print "HTTP proxy thread started..."
+        
         httpconn = org.nongnu.storm.http.client.HTTPConnection(host0, port)
                 
         req = httpconn.newRequest("GET", request, protocol2, 
java.lang.Boolean.FALSE)
-                
+        print "Make GET request(s)..."
+        
         resp = httpconn.send(req)       
-        #print resp.status, resp.reason
+        print resp.status, resp.reason
         #assert resp.status == "Ok"
-        httpconn.close  
+        
+        httpconn.close
+        #java.lang.Thread.currentThread().interrupt()
+        java.lang.Thread.interrupt()
+        print "HTTP proxy thread stopped..."    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]