Commit 2dc4bf14 authored by Łukasz Nowak's avatar Łukasz Nowak

Allow to select amount of parallel test databases.

parent b33aeef6
...@@ -6,7 +6,7 @@ from setuptools import setup, find_packages ...@@ -6,7 +6,7 @@ from setuptools import setup, find_packages
# "."], stdout=subprocess.PIPE).communicate()[0])) # "."], stdout=subprocess.PIPE).communicate()[0]))
name = "slapos.recipe.erp5" name = "slapos.recipe.erp5"
version = '1.1-dev-181' version = '1.1-dev-182'
def read(name): def read(name):
return open(name).read() return open(name).read()
......
...@@ -801,7 +801,8 @@ class Recipe(BaseSlapRecipe): ...@@ -801,7 +801,8 @@ class Recipe(BaseSlapRecipe):
return 'https://[%(ip)s]:%(port)s' % apache_conf return 'https://[%(ip)s]:%(port)s' % apache_conf
def installMysqlServer(self, ip, port, database='erp5', user='user', def installMysqlServer(self, ip, port, database='erp5', user='user',
test_database='test_erp5', test_user='test_user', template_filename=None): test_database='test_erp5', test_user='test_user', template_filename=None,
parallel_test_database_amount=100):
backup_directory = self.createBackupDirectory('mysql') backup_directory = self.createBackupDirectory('mysql')
if template_filename is None: if template_filename is None:
template_filename = self.getTemplateFilename('my.cnf.in') template_filename = self.getTemplateFilename('my.cnf.in')
...@@ -824,7 +825,7 @@ class Recipe(BaseSlapRecipe): ...@@ -824,7 +825,7 @@ class Recipe(BaseSlapRecipe):
mysql_test_user=test_user, mysql_test_user=test_user,
mysql_parallel_test_dict=[ mysql_parallel_test_dict=[
('test_%i' % x,)*2 + (self.generatePassword(),) \ ('test_%i' % x,)*2 + (self.generatePassword(),) \
for x in xrange(0,100)], for x in xrange(0,parallel_test_database_amount)],
) )
self.registerLogRotation('mysql', [error_log, slow_query_log], self.registerLogRotation('mysql', [error_log, slow_query_log],
'%(mysql_binary)s --no-defaults -B --user=root ' '%(mysql_binary)s --no-defaults -B --user=root '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment