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