You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/02/25 08:07:49 UTC

[GitHub] [shardingsphere-elasticjob] TeslaCN commented on a change in pull request #1838: Close dataSource in RDBJobEventStorageTest when each test finishes

TeslaCN commented on a change in pull request #1838:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1838#discussion_r582620613



##########
File path: elasticjob-ecosystem/elasticjob-tracing/elasticjob-tracing-rdb/src/test/java/org/apache/shardingsphere/elasticjob/tracing/rdb/storage/RDBJobEventStorageTest.java
##########
@@ -38,17 +39,24 @@
 public final class RDBJobEventStorageTest {
     
     private RDBJobEventStorage storage;
+
+    private BasicDataSource dataSource;
     
     @Before
     public void setup() throws SQLException {
-        BasicDataSource dataSource = new BasicDataSource();
+        dataSource = new BasicDataSource();
         dataSource.setDriverClassName(org.h2.Driver.class.getName());
         dataSource.setUrl("jdbc:h2:mem:job_event_storage");
         dataSource.setUsername("sa");
         dataSource.setPassword("");
         storage = new RDBJobEventStorage(dataSource);
     }
     
+    @After
+    public void teardown() throws SQLException{

Review comment:
       Thanks for your contribution!
   Please fix the checkstyle.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org