Increase parallelism

test2
Sait Talha Nisanci 2021-10-18 13:43:57 +03:00
parent 6ff2083311
commit 26c2f32b21
5 changed files with 43 additions and 5 deletions

View File

@ -171,6 +171,7 @@ jobs:
test-arbitrary-configs:
description: Runs tests on arbitrary configs
parallelism: 6
parameters:
pg_major:
description: 'postgres major version to use'
@ -207,9 +208,11 @@ jobs:
- run:
name: 'Test arbitrary configs'
command: |
TESTS=$(src/test/regress/citus_tests/print_test_names.py | circleci tests split)
TESTS=$(echo $TESTS | tr ' ' ',')
gosu circleci \
make -C src/test/regress \
check-arbitrary-configs parallel=4
check-arbitrary-configs parallel=4 CONFIGS=$TESTS
no_output_timeout: 2m
- run:
name: 'Show regressions'

3
.gitignore vendored
View File

@ -51,3 +51,6 @@ lib*.pc
# style related temporary outputs
*.uncrustify
# auto generated tests
tests.txt

View File

@ -173,10 +173,7 @@ def read_configs(docoptRes):
# We fill the configs from all of the possible classes in config.py so that if we add a new config,
# we don't need to add it here. And this avoids the problem where we forget to add it here
for x in cfg.__dict__.values():
if inspect.isclass(x) and (
issubclass(x, cfg.CitusMXBaseClusterConfig)
or issubclass(x, cfg.CitusDefaultClusterConfig)
):
if cfg.should_include_config(x):
configs.append(x(docoptRes))
return configs

View File

@ -5,6 +5,7 @@ from contextlib import closing
import os
import threading
import common
import inspect
COORDINATOR_NAME = "coordinator"
WORKER1 = "worker1"
@ -55,6 +56,16 @@ PORT_UPPER = 32768
port_lock = threading.Lock()
def should_include_config(class_name):
if inspect.isclass(class_name) and (
issubclass(class_name, CitusMXBaseClusterConfig)
or issubclass(class_name, CitusDefaultClusterConfig)
):
return True
return False
def find_free_port():
global next_port
with port_lock:

View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
import config as cfg
import inspect
def read_config_names():
config_names = []
# We fill the configs from all of the possible classes in config.py so that if we add a new config,
# we don't need to add it here. And this avoids the problem where we forget to add it here
for x in cfg.__dict__.values():
if cfg.should_include_config(x):
config_names.append(x.__name__)
return config_names
def print_config_names():
config_names = read_config_names()
for config_name in config_names:
print(config_name)
if __name__ == "__main__":
print_config_names()