Merge pull request #11474 from ziggie1984/itest-fix-outbound-rs-macaroon-flake
What changed, and why it matters
This commit only adjusts timing settings in an integration test to reduce flaky failures on slow CI systems. It is not a security fix and does not change production code.
No security action needed. Treat as a routine test reliability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies the integration test testOutboundRSMacaroonEnforcement in itest/lnd_remote_signer_test.go. It replaces hard-coded 15-second timeouts with wait.DefaultTimeout when waiting for a remote signer connection and for reading the invoice macaroon. The accompanying comments explain that slower CI runners and remote database backends can exceed the shorter timeout, causing non-deterministic test failures. No production logic, authentication, or macaroon enforcement behavior is changed.
Changed components
itest/lnd_remote_signer_test.goInspect captured patch +11 / −3
### itest/lnd_remote_signer_test.go
@@ -725,12 +725,18 @@ func testOutboundRSMacaroonEnforcement(ht *lntest.HarnessTest) {
remoteSignerHost := fmt.Sprintf(
"localhost:%d", port.NextAvailablePort(),
)
+
+ // The watch-only node starts waiting for the signer to connect after it
+ // has written its macaroons. Before the signer connects, this test
+ // still has to open a stream with the invoice macaroon and start the
+ // signer node, which can take a while on slow CI runners and remote
+ // database backends. Give the signer the default timeout to connect.
watchOnlyArgs := []string{
"--remotesigner.enable",
"--remotesigner.experimentalallowinboundconnection",
fmt.Sprintf("--remotesigner.experimentalrpclisten=%s",
remoteSignerHost),
- "--remotesigner.timeout=15s",
+ fmt.Sprintf("--remotesigner.timeout=%v", wait.DefaultTimeout),
"--remotesigner.experimentalrequesttimeout=15s",
}
@@ -750,9 +756,11 @@ func testOutboundRSMacaroonEnforcement(ht *lntest.HarnessTest) {
// The watch-only node writes its non-admin macaroons during startup,
// before it fully transitions to the ready state. Wait for the invoice
// macaroon to exist before we try to use it below, otherwise this test
- // can race that file creation on slower CI runners.
+ // can race that file creation on slower CI runners. Opening the
+ // database can take a while on remote backends, so use the default
+ // timeout.
_, err := watchOnly.ReadMacaroon(
- watchOnly.Cfg.InvoiceMacPath, 15*time.Second,
+ watchOnly.Cfg.InvoiceMacPath, wait.DefaultTimeout,
)
require.NoError(ht, err)
Why this scored 14/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.