raju-balpande commented on code in PR #5556:
URL: https://github.com/apache/ozone/pull/5556#discussion_r1389798426
##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/persistence/AbstractReconSqlDBTest.java:
##########
@@ -36,52 +38,51 @@
import org.jooq.SQLDialect;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultConfiguration;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.rules.TemporaryFolder;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Provider;
+import org.junit.jupiter.api.io.TempDir;
/**
* Class that provides a Recon SQL DB with all the tables created, and APIs
* to access the DAOs easily.
*/
public class AbstractReconSqlDBTest {
- @Rule
- public TemporaryFolder temporaryFolder = new TemporaryFolder();
+ @TempDir
+ protected Path temporaryFolder;
Review Comment:
I made it private, surprisingly the subclasses are creating their own
temporary folders and hence were not dependent on folders been create in
Abstract class. (Except TestReconWithDifferentSqlDBs which uses its super
constructor but does not use the variable temporaryFolder)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]