Skip to content

Commit 0ec9961

Browse files
authored
Test: fix removal of test certificate from root store (#10260)
Resolve #10259
1 parent e7ec325 commit 0ec9961

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/Validation.PackageSigning.Core.Tests/Support/CertificateIntegrationTestFixture.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,11 @@ public async Task<TimestampServiceWithUnavailableRevocation> CreateTimestampServ
338338
StoreLocation.LocalMachine);
339339

340340
var timestampService = TimestampService.Create(rootCa);
341-
var disposable = new DisposableList<IDisposable> { rootCertificate, trust };
341+
342+
// Do not add `rootCertificate`, because its disposal will cause subsequent disposal
343+
// of `trust` to fail and trust removal to fail.
344+
// Disposing `trust` already disposes `rootCertificate`.
345+
var disposable = new DisposableList<IDisposable> { trust };
342346

343347
Task WaitForResponseExpirationAsync()
344348
{

0 commit comments

Comments
 (0)