Steeltoe icon indicating copy to clipboard operation
Steeltoe copied to clipboard

Broken test for Common.Certificates

Open bart-vmware opened this issue 8 months ago • 0 comments

The test ConfigureCertificateOptionsTest.CertificateOptionsUpdateOnFileLocationChange contains the following line twice:

_ = changeToken.RegisterChangeCallback(_ => changeCalled = true, "state");

The second occurrence can be commented out, but the test still succeeds. Having two callbacks on the same token that execute identical logic is pointless. It doesn't prove that a change is triggered the second time.

Also, the return value of RegisterChangeCallback is disposable, so it should be wrapped in a using statement.

bart-vmware avatar Apr 15 '25 09:04 bart-vmware