Skip to content

Commit

Permalink
code coverage added
Browse files Browse the repository at this point in the history
  • Loading branch information
buckelieg committed Jul 15, 2024
1 parent 4497332 commit 8753cbf
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,34 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<configuration>
<destFile>${project.build.directory}/jacoco-report.exec</destFile>
<dataFile>${project.build.directory}/jacoco-report.exec</dataFile>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>

<profile>
<id>maven-central</id>
<build>
Expand Down Expand Up @@ -150,6 +174,7 @@
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand All @@ -160,7 +185,9 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

</profile>

</profiles>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@


// TODO more test suites for other RDBMS
public class DBTestSuite {
public class DBTests {

private static final Logger log = LogManager.getLogger(DBTestSuite.class);
private static final Logger log = LogManager.getLogger(DBTests.class);
private static Connection conn;
private static DB db;
private static DataSource ds;
Expand Down Expand Up @@ -87,7 +87,7 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOEx
EmbeddedDataSource ds = new EmbeddedDataSource();
ds.setDatabaseName("test");
ds.setCreateDatabase("create");
DBTestSuite.ds = ds;
DBTests.ds = ds;
conn = ds.getConnection();
conn.createStatement().execute("CREATE TABLE TEST(id int PRIMARY KEY GENERATED ALWAYS AS IDENTITY, name VARCHAR(255) NOT NULL)");
conn.createStatement().execute("CREATE TABLE TEST1(id int PRIMARY KEY GENERATED ALWAYS AS IDENTITY, name VARCHAR(255) NOT NULL)");
Expand Down

0 comments on commit 8753cbf

Please sign in to comment.