Our automated test suite hangs and times out after 15 minutes when executed through our CI/CD pipeline. The same tests complete successfully in 8-10 minutes when run manually from the Polarion UI.
We’ve checked the CI/CD environment variable configuration but can’t identify the root cause. Test execution timeout settings appear correct at 20 minutes. Initial investigation suggests issues with database connection pooling or test fixture initialization.
ERROR: Test execution timeout after 900 seconds
at TestRunner.executeTestPlan(TestRunner.java:234)
at CIPipeline.runAutomatedTests(CIPipeline.java:89)
Connection pool exhausted: 50/50 active connections
Has anyone experienced similar timeout issues with automated test execution in CI/CD environments? The hanging occurs inconsistently across different test plans.
I’ve seen this before. Check your connection pool settings in the CI environment. The error message shows pool exhaustion which suggests connections aren’t being released properly after test execution. Compare your CI environment variables against the manual execution environment.
We encountered this exact scenario last quarter. The root cause was a combination of insufficient connection pool size and improper connection handling in test fixtures. Our CI environment was configured with default pool settings that worked fine for manual testing but couldn’t handle the parallel execution pattern used by CI runners. The key was understanding that CI/CD pipelines often execute tests differently than the UI does - they may spawn multiple processes or use different threading models. Check your CI runner logs for connection leak warnings.
Look at your test execution timeout settings in the CI configuration file. Sometimes the CI environment has additional timeout layers beyond Polarion’s settings. Also check if background processes in CI are consuming connections.
Your CI/CD environment variable configuration needs adjustment. Specifically look at memory allocation and thread pool sizes. The database connection pooling exhaustion suggests the CI environment isn’t provisioned correctly for the load. I’d recommend profiling a test run to see where connections accumulate.
I’ve resolved this exact issue. The problem involves multiple configuration layers that need alignment.
CI/CD Environment Variable Configuration:
Your CI environment needs these variables set:
POLARION_DB_POOL_SIZE=100
POLARION_TEST_TIMEOUT=1800
POLARION_CONNECTION_TIMEOUT=30
Test Execution Timeout Settings:
The 20-minute timeout is fine, but you need to configure intermediate timeouts. Set connection acquisition timeout to 30 seconds to fail fast rather than hanging.
Database Connection Pooling:
Increase your pool size from 50 to at least 100 for CI environments. Add these properties:
maxPoolSize=100
minPoolSize=20
maxIdleTime=300
Test Fixture Initialization:
This is critical - ensure your test fixtures use try-with-resources or explicit connection cleanup:
@AfterEach
public void cleanup() {
if (connection != null) connection.close();
TestContext.releaseResources();
}
The key insight is that CI pipelines often run tests in parallel across multiple agents, multiplying connection demand. Your manual execution uses a single thread, so the default pool of 50 suffices. CI execution with parallel agents can easily require 80-100 connections simultaneously.
Additionally, implement connection leak detection by enabling pool monitoring. This will log warnings when connections aren’t returned within expected timeframes. After applying these changes, our test suite execution time dropped to 9 minutes consistently in CI, matching manual execution performance.
Monitor your connection pool metrics for the first few CI runs to ensure 100 connections is adequate. If you still see exhaustion, increase incrementally to 150.
The 50/50 active connections is definitely your bottleneck. Your test fixture initialization might be creating connections that aren’t cleaned up between test cases. We had a similar issue where setup methods opened connections but teardown wasn’t consistently releasing them. Check if your CI pipeline is running tests in parallel - that would multiply the connection demand. Also verify the database connection pooling configuration matches between environments. The timeout setting of 20 minutes won’t help if connections are exhausted earlier.