From 1df1b05876c476f62958badf1a844478e9f7670f Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 06:24:11 +0000 Subject: [PATCH] test: drop the fixed sleep and the link0 pin from the cluster tests New-PveCluster -Wait now guarantees quorum, so the Start-Sleep -Seconds 5 that lost the race is replaced by an assertion on the new contract. The link0 pin is dropped: the join-abort and the never-a-member modes both occurred with and without it, so it was never implicated, and -Links is already covered at the service level. Co-Authored-By: Claude Opus 5 (1M context) --- .../PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 b/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 index 39338c9..d982d70 100644 --- a/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 +++ b/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 @@ -112,8 +112,11 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' { $result | Should -Not -BeNullOrEmpty $script:ClusterCreated = $true - # Allow corosync to fully stabilize - Start-Sleep -Seconds 5 + # New-PveCluster -Wait returns only once the cluster is quorate (D014), + # which is what makes the join below safe without a sleep. + $cluster = @(Get-PveClusterStatus -ErrorAction Stop) | + Where-Object { $_.Type -eq 'cluster' } | Select-Object -First 1 + $cluster.Quorate | Should -Be 1 -Because 'node A must be quorate before node B can join' } It 'Get-PveClusterStatus shows cluster formed' { @@ -169,13 +172,10 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' { $joinPw = ConvertTo-SecureString $script:Password -AsPlainText -Force try { - # ring0 defaults to whatever node B resolves its own hostname to; - # pin it to the address the harness verified it answers on. $result = Add-PveClusterMember ` -Hostname $script:Host_ ` -Fingerprint $fingerprint ` -Password $joinPw ` - -Links "link0=$($script:HostB)" ` -Wait ` -Confirm:$false ` -ErrorAction Stop