new
This commit is contained in:
parent
3f641c6e8d
commit
50cbef999c
21
smmapdfw/test/test_worker.py
Normal file
21
smmapdfw/test/test_worker.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import random
|
||||||
|
from Connector import Connector
|
||||||
|
|
||||||
|
class test_worker1 (Connector):
|
||||||
|
|
||||||
|
def __init__(self, config, details):
|
||||||
|
Connector.__init__(self, config, details)
|
||||||
|
self.letters = ('a','b','c','d','e','f','g','h','i','j',
|
||||||
|
'k','l','m','n','o','p','q','r','s','t',
|
||||||
|
'u','v','w','x','y','z')
|
||||||
|
random.seed()
|
||||||
|
|
||||||
|
def execute(self):
|
||||||
|
queriesPerSession = int(self.config.get('TestWorker', 'QueriesPerSession'))
|
||||||
|
self.connect()
|
||||||
|
for i in range(queriesPerSession):
|
||||||
|
a = ''.join(random.sample(self.letters, 10))
|
||||||
|
self.query(a)
|
||||||
|
self.close()
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user