Skip to content

Commit cfcc1de

Browse files
authored
hotfix(global): try to resolve concurrency issues in worker tests (#5900)
* hotfix(global): try to resolve concurrency issues in worker tests * hotfix(global): try to resolve concurrency issues in worker tests * hotfix(global): try to resolve concurrency issues in worker tests
1 parent aa70ae2 commit cfcc1de

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bin/run_condo_domain_tests.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ node bin/prepare.js -f condo -r condo
3535
export NEWS_ITEMS_SENDING_DELAY_SEC=2
3636
export NEWS_ITEM_SENDING_TTL_SEC=2
3737
export NODE_OPTIONS="--max_old_space_size=4192"
38+
export WORKER_CONCURRENCY=100
3839

3940
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'
4041

@@ -59,10 +60,10 @@ sleep 3
5960

6061
if [ $domain_name != "others" ]; then
6162
# TESTS
62-
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=2 --forceExit --silent=false --verbose --bail --testPathPattern '/domains/'$domain_name'/schema/(.*)[.]test.js$' 2>&1 > '/app/test_logs/condo.'$domain_name'.tests.log'
63+
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=3 --forceExit --silent=false --verbose --bail --testPathPattern '/domains/'$domain_name'/schema/(.*)[.]test.js$' 2>&1 > '/app/test_logs/condo.'$domain_name'.tests.log'
6364
# SPECS
6465
if [ -n "$(find apps/condo/domains/$domain_name -name '*spec.[j|t]s' 2>/dev/null)" ]; then
65-
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=2 --forceExit --silent=false --verbose --bail --testPathPattern '/domains/'$domain_name'/(.*)[.]spec.[j|t]s$' 2>&1 > '/app/test_logs/condo.'$domain_name'.specs.log'
66+
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=3 --forceExit --silent=false --verbose --bail --testPathPattern '/domains/'$domain_name'/(.*)[.]spec.[j|t]s$' 2>&1 > '/app/test_logs/condo.'$domain_name'.specs.log'
6667
else
6768
echo "Files matching (.*)[.]spec.[j|t]s in directory apps/condo/domains/$domain_name not found! Skipping..."
6869
fi
@@ -71,10 +72,10 @@ if [ $domain_name != "others" ]; then
7172
killall node || echo 'no node processes'
7273
else
7374
# TESTS
74-
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=2 --forceExit --silent=false --verbose --bail --testPathPattern '/schema/(.*)[.]test.js$' --testPathIgnorePatterns='/domains/(organization|user|scope|property|acquiring|billing|miniapp|banking|ticket|meter|contact|resident|notification|common)/' 2>&1 > /app/test_logs/condo.others.tests.log
75-
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=2 --forceExit --silent=false --verbose --bail --testPathPattern '(.*)[.]test.js$' --testPathIgnorePatterns='/schema/(.*)[.]test.js$' 2>&1 > /app/test_logs/condo.5.test.others.log
75+
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=3 --forceExit --silent=false --verbose --bail --testPathPattern '/schema/(.*)[.]test.js$' --testPathIgnorePatterns='/domains/(organization|user|scope|property|acquiring|billing|miniapp|banking|ticket|meter|contact|resident|notification|common)/' 2>&1 > /app/test_logs/condo.others.tests.log
76+
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=3 --forceExit --silent=false --verbose --bail --testPathPattern '(.*)[.]test.js$' --testPathIgnorePatterns='/schema/(.*)[.]test.js$' 2>&1 > /app/test_logs/condo.5.test.others.log
7677
# SPECS
77-
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=2 --forceExit --silent=false --verbose --bail --testPathPattern '(.*)[.]spec.[j|t]s$' --testPathIgnorePatterns='/domains/(organization|user|scope|property|acquiring|billing|miniapp|banking|ticket|meter|contact|resident|notification|common)/' 2>&1 > /app/test_logs/condo.others.specs.log
78+
yarn workspace @app/condo test --workerIdleMemoryLimit="256MB" --testTimeout=15000 -w=3 --forceExit --silent=false --verbose --bail --testPathPattern '(.*)[.]spec.[j|t]s$' --testPathIgnorePatterns='/domains/(organization|user|scope|property|acquiring|billing|miniapp|banking|ticket|meter|contact|resident|notification|common)/' 2>&1 > /app/test_logs/condo.others.specs.log
7879
# Note: we need to stop background worker! because packages tests use the same redis queue
7980
kill $(jobs -p) || echo 'background worker and dev server is already killed!'
8081
killall node || echo 'no node processes'

0 commit comments

Comments
 (0)