forked from thepaul/cassandra-dtest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadmaker_test.py
More file actions
42 lines (32 loc) · 1.16 KB
/
loadmaker_test.py
File metadata and controls
42 lines (32 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import time
import loadmaker
from dtest import Tester
class TestLoadmaker(Tester):
def loadmaker_test(self):
cluster = self.cluster
cluster.populate(1).start()
node1 = cluster.nodelist()[0]
time.sleep(.2)
host, port = node1.network_interfaces['thrift']
lm = loadmaker.LoadMaker(host, port, column_family_name='cf_standard',
consistency_level='ONE')
lm.generate(500)
lm.validate()
lm.update(100)
lm.validate()
lm.delete(10)
lm.validate()
lm = loadmaker.LoadMaker(host, port, column_family_name='cf_counter',
is_counter=True,
consistency_level='ONE')
lm.generate(200)
lm.validate()
lm1 = loadmaker.LoadMaker(host, port, column_family_name='cf_standard2',
consistency_level='ONE')
lm2 = loadmaker.LoadMaker(host, port, column_family_name='cf_counter2',
is_counter=True,
consistency_level='ONE')
cont_loader = loadmaker.ContinuousLoader([lm1, lm2])
time.sleep(10)
cont_loader.read_and_validate()
cont_loader.exit()