Skip to content

Commit 640b198

Browse files
authored
remove the clearParam (#6471)
1 parent d72cbf3 commit 640b198

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ public static void setParam(final String[] args, final String confFileName) {
388388
AnsiConsole.systemUninstall();
389389
throw new TronError(e, TronError.ErrCode.JDK_VERSION);
390390
}
391-
clearParam(); // reset all parameters to avoid the influence in test
392391
JCommander.newBuilder().addObject(PARAMETER).build().parse(args);
393392
if (PARAMETER.version) {
394393
printVersion();

framework/src/test/java/org/tron/core/config/args/LocalWitnessTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.common.collect.Lists;
2424
import java.io.IOException;
2525
import java.security.SecureRandom;
26+
import org.junit.AfterClass;
2627
import org.junit.Assert;
2728
import org.junit.Before;
2829
import org.junit.Rule;
@@ -52,6 +53,11 @@ public void setLocalWitness() {
5253
PRIVATE_KEY));
5354
}
5455

56+
@AfterClass
57+
public static void clear() {
58+
Args.clearParam();
59+
}
60+
5561
@Test
5662
public void whenSetNullPrivateKey() {
5763
localWitness.setPrivateKeys(null);

0 commit comments

Comments
 (0)