Skip to content

Commit

Permalink
Remove duplicated table drop/init calls and add load of the derby.*.s…
Browse files Browse the repository at this point in the history
…ql scripts.

Signed-off-by: Scott M Stark <[email protected]>
  • Loading branch information
starksm64 committed Dec 18, 2024
1 parent 94a984d commit f6fc0d5
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 3 deletions.
67 changes: 66 additions & 1 deletion glassfish-runner/persistence-platform-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,70 @@
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>start-database</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>target/glassfish8/glassfish/bin/asadmin</executable>
<arguments>
<argument>start-database</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>stop-database-final</id>
<goals>
<goal>exec</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<executable>target/glassfish8/glassfish/bin/asadmin</executable>
<arguments>
<argument>stop-database</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<successCode>1</successCode>
</successCodes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>initdb</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<target>
<path id="jdbc.classpath">
<pathelement path="target/glassfish8/javadb/lib/derbyclient.jar"></pathelement>
<path refid="maven.runtime.classpath"></path>
</path>
<sql autocommit="true" classpathref="jdbc.classpath" delimiter=";" driver="org.apache.derby.jdbc.ClientDriver" onerror="continue" password="cts1" url="jdbc:derby://localhost:1527/derbyDB" userid="cts1">
<transaction src="sql/derby/derby.ddl.persistence.sql"></transaction>
<transaction src="sql/derby/derby.ddl.persistence.sprocs.sql"></transaction>
</sql>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.0</version>
Expand Down Expand Up @@ -447,7 +511,8 @@
<configuration>
<includes>

<include>ee/jakarta/tck/persistence/core/types/generator/Client1PmservletTest.java</include>
<include>ee/jakarta/tck/persistence/core/StoredProcedureQuery/Client1PmservletTest.java</include>
<!--include>ee/jakarta/tck/persistence/**/*Test.java</include-->
</includes>
<!-- Select the @Tag("tck-javatest") tests -->
<groups>tck-javatest</groups>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public void setup(String[] args, Properties p) throws Exception {

super.setup(args, p);
removeTestData();
logTrace("removeTestData done");
createEmployeeTestData();
logTrace("createEmployeeTestData done");
dataBaseName = p.getProperty("jdbc.db");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void setup(String[] args, Properties p) throws Exception {
logTrace( "setup");

super.setup(args,p);
removeTestData();
createEmployeeTestData();
//removeTestData();
//createEmployeeTestData();
dataBaseName = p.getProperty("jdbc.db");

}
Expand Down

0 comments on commit f6fc0d5

Please sign in to comment.