Skip to content

Commit

Permalink
removed unnecessary database clearing after unit tests and closed tes…
Browse files Browse the repository at this point in the history
…t connection after use (#179)
  • Loading branch information
Abigael-JT authored Feb 11, 2025
1 parent 4c67f82 commit 3f1d723
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ public void createTargetTable() {

@AfterAll
public void tearDown() {
Assertions.assertDoesNotThrow(() -> {
conn.prepareStatement("DROP ALL OBJECTS").execute(); //h2 clear database
conn.close();
});
Assertions.assertDoesNotThrow(conn::close);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ public void setup() {

@AfterAll
public void tearDown() {
Assertions.assertDoesNotThrow(() -> {
conn.prepareStatement("DROP ALL OBJECTS").execute(); //h2 clear database
conn.close();
});
Assertions.assertDoesNotThrow(conn::close);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ public void createTargetTable() {

@AfterAll
public void tearDown() {
Assertions.assertDoesNotThrow(() -> {
conn.prepareStatement("DROP ALL OBJECTS").execute(); //h2 clear database
conn.close();
});
Assertions.assertDoesNotThrow(conn::close);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,7 @@ public void createTargetTable() {

@AfterAll
public void tearDown() {
Assertions.assertDoesNotThrow(() -> {
conn.prepareStatement("DROP ALL OBJECTS").execute(); //h2 clear database
conn.close();
});
Assertions.assertDoesNotThrow(conn::close);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ void setup() {

@AfterAll
void tearDown() {
Assertions.assertDoesNotThrow(() -> {
conn.prepareStatement("DROP ALL OBJECTS").execute(); //h2 clear database
conn.close();
});
Assertions.assertDoesNotThrow(conn::close);
}

@Test
Expand Down

0 comments on commit 3f1d723

Please sign in to comment.