Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Solve #1315, add 200K mover stress test methods (#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
duzhen1996 authored and qiyuangong committed Oct 30, 2017
1 parent 5e280d9 commit 4b80e91
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions supports/integration-test/test_mover_1MB_20W.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import unittest
from util import *


FILE_SIZE = 1 * 1024 * 1024


class TestMover_1MB_20W(unittest.TestCase):
def test_20W_archive(self):
#create 20W files and move to archive
cmd_create_list = []
cmd_move_list = []
file_paths = []
cids = []
max_number = 200000
#launch 20W cmdlet
print "launch 20W create cmdlet"
for num in range(max_number):
file_path, cid = create_random_file_parallel(FILE_SIZE)
file_paths.append(file_path)
cids.append(cid)
print "move 20W file into archive"
for num in range(max_number):
cids.append(move_cmdlet("archive",file_paths[num]))

#check
failed_cids = wait_for_cmdlets(cids)
self.assertTrue(len(failed_cids) == 0)

def test_20W_onessd(self):
#create 20W files and move to archive
cmd_create_list = []
cmd_move_list = []
file_paths = []
cids = []
max_number = 200000
#launch 20W cmdlet
print "launch 20W create cmdlet"
for num in range(max_number):
file_path, cid = create_random_file_parallel(FILE_SIZE)
file_paths.append(file_path)
cids.append(cid)
print "move 20W file into archive"
for num in range(max_number):
cids.append(move_cmdlet("onessd",file_paths[num]))

#check
failed_cids = wait_for_cmdlets(cids)
self.assertTrue(len(failed_cids) == 0)

def test_20W_allssd(self):
#create 20W files and move to archive
cmd_create_list = []
cmd_move_list = []
file_paths = []
cids = []
max_number = 200000
#launch 20W cmdlet
print "launch 20W create cmdlet"
for num in range(max_number):
file_path, cid = create_random_file_parallel(FILE_SIZE)
file_paths.append(file_path)
cids.append(cid)
print "move 20W file into archive"
for num in range(max_number):
cids.append(move_cmdlet("allssd",file_paths[num]))

#check
failed_cids = wait_for_cmdlets(cids)
self.assertTrue(len(failed_cids) == 0)




if __name__ == '__main__':
unittest.main()

0 comments on commit 4b80e91

Please sign in to comment.