List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:May 7 2007 7:59am
Subject:Rev 111: Fixed Python tests to use createNdb instead of getNdb in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
View as plain text  
------------------------------------------------------------
revno: 111
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Mon 2007-05-07 00:59:37 -0700
message:
  Fixed Python tests to use createNdb instead of getNdb
modified:
  python/test.py                
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2ftest.py
  python/testasynch.py           testasynch.py-20070227185119-f8ow9m7i9zfgr5jr-1
  python/testcol.py              testcol.py-20070506023415-o1g4qsz3fyfle5iq-1
  python/testdt.py               testdt.py-20070506023415-o1g4qsz3fyfle5iq-2
=== modified file 'python/test.py'
--- a/python/test.py	2007-05-05 06:51:06 +0000
+++ b/python/test.py	2007-05-07 07:59:37 +0000
@@ -53,7 +53,7 @@
     sys.exit(-1);
 
 
-myNdb = connection.getNdb("test")
+myNdb = connection.createNdb("test")
 
 if (myNdb.init(4) == -1):
     print myNdb.getNdbError().getMessage()

=== modified file 'python/testasynch.py'
--- a/python/testasynch.py	2007-05-05 08:08:13 +0000
+++ b/python/testasynch.py	2007-05-07 07:59:37 +0000
@@ -24,7 +24,7 @@
 
 num_iter=int(sys.argv[1])
 INSERT_NUM=int(sys.argv[2])
-concurrent=10
+concurrent=1
 BATCH_SIZE=1000
 
 db = MySQLdb.connect(host="localhost",user="root",read_default_group="client")
@@ -65,9 +65,9 @@
     sys.exit(-1);
 
 
-myNdb = connection.getNdb("test")
+myNdb = connection.createNdb("test")
 
-if (myNdb.init(4) == -1):
+if (myNdb.init(1000) == -1):
     print myNdb.getNdbError().getMessage()
     sys.exit(-1)
 
@@ -151,7 +151,7 @@
   mydata=threading.local()
   mydata.t=threading.currentThread()
   with connsem:
-    mydata.ndb=connection.getNdb("test")
+    mydata.ndb=connection.createNdb("test")
   if (mydata.ndb.init(4) == -1):
     print mydata.ndb.getNdbError().getMessage()
     sys.exit(-1)
@@ -178,7 +178,7 @@
     if mydata.myTrans.executeAsynchPrepare( ndbapi.Commit , mydata.cb ) == -1:
         print mydata.myTrans.getNdbError().getMessage()
     mydata.translist.append(mydata.myTrans)
-    if mydata.f%2==0:
+    if mydata.f%10==0:
       #print "polling"
       mydata.ndb.sendPollNdb(3000,20)
       for mydata.x in range(0,len(mydata.translist)):

=== modified file 'python/testcol.py'
--- a/python/testcol.py	2007-05-06 02:34:17 +0000
+++ b/python/testcol.py	2007-05-07 07:59:37 +0000
@@ -5,7 +5,7 @@
 c.connect(1,1,1)
 c.wait_until_ready(5,5)
 
-ndb=c.getNdb('test')
+ndb=c.createNdb('test')
 ndb.init(1)
 t=ndb.startTransaction()
 

=== modified file 'python/testdt.py'
--- a/python/testdt.py	2007-05-06 02:34:17 +0000
+++ b/python/testdt.py	2007-05-07 07:59:37 +0000
@@ -7,7 +7,7 @@
 c.connect(1,1,1)
 c.wait_until_ready(5,5)
 
-ndb=c.getNdb('test')
+ndb=c.createNdb('test')
 ndb.init(1)
 t=ndb.startTransaction()
 

Thread
Rev 111: Fixed Python tests to use createNdb instead of getNdb in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmergeMonty Taylor7 May