-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
duroxide-pgIssues reported by duroxide-pg-opt providerIssues reported by duroxide-pg-opt provider
Description
Problem
The stress test framework in src/provider_stress_test/core.rs has a hardcoded 60-second timeout for wait_for_orchestration:
// src/provider_stress_test/core.rs:177
match client_clone
.wait_for_orchestration(&instance, std::time::Duration::from_secs(60))
.awaitThis causes issues when running stress tests against high-latency remote databases (e.g., Azure PostgreSQL with 200-300ms query latency). The large payload test with 20 activities + 5 sub-orchestrations creates ~80-100 history events, and each fetch_history call takes 1-2 seconds, easily exceeding the 60-second timeout.
Proposed Solution
Add a configurable timeout field to StressTestConfig:
/// Configuration for stress tests
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StressTestConfig {
/// Maximum number of concurrent orchestrations
pub max_concurrent: usize,
/// Duration to run the test (seconds)
pub duration_secs: u64,
/// Number of tasks each orchestration fans out to
pub tasks_per_instance: usize,
/// Simulated activity execution time (ms)
pub activity_delay_ms: u64,
/// Orchestration dispatcher concurrency
pub orch_concurrency: usize,
/// Worker dispatcher concurrency
pub worker_concurrency: usize,
/// Timeout for wait_for_orchestration (seconds) - NEW
pub wait_timeout_secs: u64,
}
impl Default for StressTestConfig {
fn default() -> Self {
Self {
// ... existing defaults ...
wait_timeout_secs: 60, // Backward compatible default
}
}
}Then use it in the stress test loop:
match client_clone
.wait_for_orchestration(&instance, std::time::Duration::from_secs(config.wait_timeout_secs))
.awaitImpact
This change would allow provider implementers to configure appropriate timeouts based on their deployment environment without sacrificing test coverage.
Metadata
Metadata
Assignees
Labels
duroxide-pgIssues reported by duroxide-pg-opt providerIssues reported by duroxide-pg-opt provider