Reset discoverer after directory based test

This commit is contained in:
Paul Schaub 2022-03-21 13:10:42 +01:00
parent 7a36c285b5
commit 21bdd04d80
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 9 additions and 1 deletions

View file

@ -39,9 +39,11 @@ public class Fetch implements Runnable {
) )
boolean armor = false; boolean armor = false;
private static CertificateDiscoverer discoverer = new DefaultCertificateDiscoverer( public static final CertificateDiscoverer DEFAULT_DISCOVERER = new DefaultCertificateDiscoverer(
new PGPainlessCertificateParser(), new HttpsUrlConnectionCertificateFetcher()); new PGPainlessCertificateParser(), new HttpsUrlConnectionCertificateFetcher());
private static CertificateDiscoverer discoverer = DEFAULT_DISCOVERER;
@Override @Override
public void run() { public void run() {

View file

@ -4,6 +4,7 @@
package pgp.wkd.cli.test_suite; package pgp.wkd.cli.test_suite;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.TestFactory; import org.junit.jupiter.api.TestFactory;
@ -70,4 +71,9 @@ public class TestSuiteTestRunner {
} }
}); });
} }
@AfterAll
public static void reset() {
Fetch.setCertificateDiscoverer(Fetch.DEFAULT_DISCOVERER);
}
} }