$ go test -count=1 -run ^TestWatchSource_Run$ github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor
2023/11/09 10:38:35 ui: Waiting for the source VM to be powered-on and accessible...
2023/11/09 10:38:36 ui: Source VM is NOT powered-on yet, continue watching...
2023/11/09 10:38:36 ui: Source VM is powered-on, waiting for an IP to be assigned...
2023/11/09 10:38:36 ui: Successfully obtained the source VM IP: 1.2.3.4
2023/11/09 10:38:36 ui: Getting source VM ingress IP from the VMService object
2023/11/09 10:38:36 ui: VMService object's ingress IP is empty, continue checking...
2023/11/09 10:38:36 Retryable error: VMService object's ingress IP is empty, continue checking...
2023/11/09 10:38:41 ui: Successfully retrieved the source VM ingress IP: 5.6.7.8
2023/11/09 10:38:41 ui: Source VM is now ready in Supervisor cluster
--- FAIL: TestWatchSource_Run (6.00s)
utils_test.go:61: Expected output "Successfully retrieved the source VM ingress IP: 5.6.7.8" but got "VMService object's ingress IP is empty, continue checking..."
FAIL
FAIL github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor 6.748s
FAIL
Running the above test against this PR:
$ go test -count=1 -run ^TestWatchSource_Run$ github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor
ok github.com/hashicorp/packer-plugin-vsphere/builder/vsphere/supervisor 6.587s
This is a follow-up change to https://github.com/hashicorp/packer-plugin-vsphere/pull/321 which appears still failing the CI test.
To verify, I manually updated the test code to ensure the timing issue occurs:
Running the above test against upstream/main:
Running the above test against this PR: