Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unnecessary use of static temp dir #6251

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
@SuppressWarnings("rawtypes")
public class PrivacyReorgTest {

@TempDir private static Path folder;
@TempDir private Path folder;

private static final Supplier<SignatureAlgorithm> SIGNATURE_ALGORITHM =
Suppliers.memoize(SignatureAlgorithmFactory::getInstance);
Expand Down
2 changes: 1 addition & 1 deletion besu/src/test/java/org/hyperledger/besu/RunnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void stopVertx() {
vertx.close();
}

@TempDir private static Path temp;
@TempDir private Path temp;

@Test
public void getFixedNodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import org.mockito.Mockito;

public abstract class AbstractEthGraphQLHttpServiceTest {
@TempDir private static Path tempDir;
@TempDir private Path tempDir;

private static BlockchainSetupUtil blockchainSetupUtil;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import org.mockito.Mockito;

public class GraphQLHttpServiceCorsTest {
@TempDir private static Path folder;
@TempDir private Path folder;

private final Vertx vertx = Vertx.vertx();
private final OkHttpClient client = new OkHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

public class GraphQLHttpServiceHostWhitelistTest {

@TempDir private static Path folder;
@TempDir private Path folder;

protected static Vertx vertx;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

public class GraphQLHttpServiceTest {

// this tempDir is deliberately static
@TempDir private static Path folder;

private static final Vertx vertx = Vertx.vertx();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.junit.jupiter.api.io.TempDir;

public class JsonRpcHttpServiceCorsTest {
@TempDir private static Path folder;
@TempDir private Path folder;

private final Vertx vertx = Vertx.vertx();
private final OkHttpClient client = new OkHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
@ExtendWith(MockitoExtension.class)
public class JsonRpcHttpServiceLoginTest {

// this tempDir is deliberately static
@TempDir private static Path folder;

private static final Vertx vertx = Vertx.vertx();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
@ExtendWith(MockitoExtension.class)
public class JsonRpcHttpServiceRpcApisTest {

@TempDir private static Path folder;
@TempDir private Path folder;

private final Vertx vertx = Vertx.vertx();
private final OkHttpClient client = new OkHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

public class JsonRpcHttpServiceTestBase {

// this tempDir is deliberately static
@TempDir private static Path folder;
protected final JsonRpcTestHelper testHelper = new JsonRpcTestHelper();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
import org.junit.jupiter.api.io.TempDir;

public class JsonRpcHttpServiceTlsClientAuthTest {
// this tempDir is deliberately static
@TempDir private static Path folder;

protected static final Vertx vertx = Vertx.vertx();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

public class DebugStandardTraceBlockToFileTest {

// this tempDir is deliberately static
@TempDir private static Path folder;

private final WorldStateArchive archive =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
@MockitoSettings(strictness = Strictness.LENIENT)
public class TransactionTracerTest {

@TempDir private static Path traceDir;
@TempDir private Path traceDir;

@Mock private ProtocolSchedule protocolSchedule;
@Mock private Blockchain blockchain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
@MockitoSettings(strictness = Strictness.LENIENT)
public class BlockchainQueriesLogCacheTest {

// this tempDir is deliberately static
@TempDir private static Path cacheDir;

private static LogsQuery logsQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@

public class PrivacyPrecompiledContractIntegrationTest {

// this tempDir is deliberately static
@TempDir private static Path folder;

private static final Bytes VALID_PRIVATE_TRANSACTION_RLP =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

public class RawBlockIteratorTest {

@TempDir private static Path tmp;
@TempDir private Path tmp;
private BlockDataGenerator gen;

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class StaticNodesParserTest {
.discoveryAndListeningPorts(30306)
.build());

@TempDir private static Path testFolder;
@TempDir private Path testFolder;

@Test
public void validFileLoadsWithExpectedEnodes() throws IOException, URISyntaxException {
Expand Down
Loading