77import java .util .stream .Collectors ;
88import lombok .extern .slf4j .Slf4j ;
99import org .apache .commons .lang3 .ArrayUtils ;
10+ import org .apache .commons .lang3 .RandomStringUtils ;
1011import org .junit .After ;
1112import org .junit .Assert ;
1213import org .junit .Before ;
@@ -34,9 +35,12 @@ public class RevokingDbWithCacheNewValueTest {
3435 private Application appT ;
3536 private TestRevokingTronStore tronDatabase ;
3637
38+ private String databasePath = "" ;
39+
3740 @ Before
3841 public void init () {
39- Args .setParam (new String []{"-d" , "output_revokingStore_test" },
42+ databasePath = "output_revokingStore_test_" + RandomStringUtils .randomAlphanumeric (10 );
43+ Args .setParam (new String []{"-d" , databasePath },
4044 Constant .TEST_CONF );
4145 context = new TronApplicationContext (DefaultConfig .class );
4246 appT = ApplicationFactory .create (context );
@@ -47,7 +51,7 @@ public void removeDb() {
4751 Args .clearParam ();
4852 context .destroy ();
4953 tronDatabase .close ();
50- FileUtil .deleteDir (new File ("output_revokingStore_test" ));
54+ FileUtil .deleteDir (new File (databasePath ));
5155 }
5256
5357 @ Test
@@ -384,7 +388,8 @@ public synchronized void testGetKeysNextWithSameKey() {
384388 public synchronized void testGetKeysNextWithSameKeyOrderCheck () {
385389 revokingDatabase = context .getBean (SnapshotManager .class );
386390 revokingDatabase .enable ();
387- tronDatabase = new TestRevokingTronStore ("testSnapshotManager-testGetKeysNextWithSameKey" );
391+ tronDatabase = new TestRevokingTronStore (
392+ "testSnapshotManager-testGetKeysNextWithSameKeyOrderCheck" );
388393 revokingDatabase .add (tronDatabase .getRevokingDB ());
389394 while (revokingDatabase .size () != 0 ) {
390395 revokingDatabase .pop ();
0 commit comments