mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 00:54:23 +00:00
Add TimeoutCheckInterval to instance configuration in tests
This commit is contained in:
@@ -22,6 +22,7 @@ func TestNewInstanceManager(t *testing.T) {
|
||||
DefaultAutoRestart: true,
|
||||
DefaultMaxRestarts: 3,
|
||||
DefaultRestartDelay: 5,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
@@ -101,6 +102,7 @@ func TestCreateInstance_MaxInstancesLimit(t *testing.T) {
|
||||
cfg := config.InstancesConfig{
|
||||
PortRange: [2]int{8000, 9000},
|
||||
MaxInstances: 2, // Very low limit for testing
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -237,6 +239,7 @@ func TestCreateInstance_PortExhaustion(t *testing.T) {
|
||||
cfg := config.InstancesConfig{
|
||||
PortRange: [2]int{8000, 8001}, // Only 2 ports available
|
||||
MaxInstances: 10, // Higher than available ports
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -500,6 +503,7 @@ func TestPersistence_InstancePersistedOnCreation(t *testing.T) {
|
||||
PortRange: [2]int{8000, 9000},
|
||||
InstancesDir: tempDir,
|
||||
MaxInstances: 10,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -545,6 +549,7 @@ func TestPersistence_InstancePersistedOnUpdate(t *testing.T) {
|
||||
PortRange: [2]int{8000, 9000},
|
||||
InstancesDir: tempDir,
|
||||
MaxInstances: 10,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -602,6 +607,7 @@ func TestPersistence_InstanceFileDeletedOnDeletion(t *testing.T) {
|
||||
PortRange: [2]int{8000, 9000},
|
||||
InstancesDir: tempDir,
|
||||
MaxInstances: 10,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -673,6 +679,7 @@ func TestPersistence_InstancesLoadedFromDisk(t *testing.T) {
|
||||
PortRange: [2]int{8000, 9000},
|
||||
InstancesDir: tempDir,
|
||||
MaxInstances: 10,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -740,6 +747,7 @@ func TestPersistence_PortMapPopulatedFromLoadedInstances(t *testing.T) {
|
||||
PortRange: [2]int{8000, 9000},
|
||||
InstancesDir: tempDir,
|
||||
MaxInstances: 10,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
manager := manager.NewInstanceManager(cfg)
|
||||
|
||||
@@ -770,6 +778,7 @@ func TestPersistence_CompleteInstanceDataRoundTrip(t *testing.T) {
|
||||
DefaultAutoRestart: true,
|
||||
DefaultMaxRestarts: 3,
|
||||
DefaultRestartDelay: 5,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
|
||||
// Create first manager and instance with comprehensive options
|
||||
@@ -887,6 +896,7 @@ func createTestManager() manager.InstanceManager {
|
||||
DefaultAutoRestart: true,
|
||||
DefaultMaxRestarts: 3,
|
||||
DefaultRestartDelay: 5,
|
||||
TimeoutCheckInterval: 5,
|
||||
}
|
||||
return manager.NewInstanceManager(cfg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user