From edff8d2e371e9402b46ce5ae8e19b09bbac2863e Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Wed, 4 Feb 2026 11:21:36 -0800 Subject: [PATCH 1/2] feat(BRE2-656): Allow modification of instance poll interval --- v1/instance.go | 1 + v1/notimplemented.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/v1/instance.go b/v1/instance.go index 0a9b7b2..cb10640 100644 --- a/v1/instance.go +++ b/v1/instance.go @@ -11,6 +11,7 @@ import ( type CloudInstanceReader interface { GetInstance(ctx context.Context, id CloudProviderInstanceID) (*Instance, error) ListInstances(ctx context.Context, args ListInstancesArgs) ([]Instance, error) + GetInstancePollTime() time.Duration } type CloudCreateTerminateInstance interface { diff --git a/v1/notimplemented.go b/v1/notimplemented.go index 84fe74f..2724cf8 100644 --- a/v1/notimplemented.go +++ b/v1/notimplemented.go @@ -43,6 +43,11 @@ func (c notImplCloudClient) GetInstanceTypePollTime() time.Duration { return pollTime } +func (c notImplCloudClient) GetInstancePollTime() time.Duration { + pollTime := 5 * time.Second + return pollTime +} + func (c notImplCloudClient) CreateInstance(_ context.Context, _ CreateInstanceAttrs) (*Instance, error) { return nil, ErrNotImplemented } From 1625be2ce388e0f294e3fc652cb4ef055d48edde Mon Sep 17 00:00:00 2001 From: Drew Malin Date: Wed, 4 Feb 2026 11:27:08 -0800 Subject: [PATCH 2/2] mock client --- v1/waiters_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v1/waiters_test.go b/v1/waiters_test.go index 3339253..665f09f 100644 --- a/v1/waiters_test.go +++ b/v1/waiters_test.go @@ -78,6 +78,10 @@ func (m *mockCloudInstanceReader) ListInstances(_ context.Context, _ ListInstanc return nil, nil } +func (m *mockCloudInstanceReader) GetInstancePollTime() time.Duration { + return 5 * time.Second +} + // setStatusSequence sets up a sequence of statuses that will be returned for an instance func (m *mockCloudInstanceReader) setStatusSequence(instanceID CloudProviderInstanceID, sequence []LifecycleStatus) { m.statusSequence[instanceID] = sequence