Skip to content

Commit

Permalink
DR2-2038 Upate Derby database
Browse files Browse the repository at this point in the history
This is not to the latest version because the latest version needs java
21 and we're not quite ready to go that high.

This version needs Java 17 which is the same as the bundled version.

The name of the driver class has changed and has been updated in all of
the places it's set.

I wanted to get this working on 21 anyway. DROID itself runs happily on
21 but the tests weren't passing because of how old Mockito was so I've
upgraded that.

I've removed versions 7 and 11 from the CI workflow.

The last thing was an odd test failure in the tests for ProfileFileChooser
It was saying that multiSelectionEnabled was true when run on Java 21.
If you run DROID on Java 21 then multi selection is enabled. I'm not
sure why but setting it to false in the setup method brings back the old
behaviour.
  • Loading branch information
MancunianSam committed Jan 14, 2025
1 parent 4232279 commit 4d4b93e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
jdk: [8, 11, 17]
jdk: [17, 21]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
package uk.gov.nationalarchives.droid.command;

import junit.framework.Assert;
import net.bytebuddy.asm.Advice;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
Expand Down
2 changes: 1 addition & 1 deletion droid-export/src/test/resources/jpa-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
datasource.driverClassName=org.apache.derby.iapi.jdbc.AutoloadedDriver
datasource.url=jdbc:derby:droid-test-db;create=true
datasource.username=droid_user
datasource.password=droid_user
Expand Down
4 changes: 2 additions & 2 deletions droid-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

<spring.version>5.3.27</spring.version>
<hibernate.version>5.4.1.Final</hibernate.version>
<derby.version>10.13.1.1</derby.version>
<derby.version>10.16.1.1</derby.version>
<cxf.version>3.5.9</cxf.version>
<java.iso-tools.version>2.1.0</java.iso-tools.version>
<jaxb.version>2.3.1</jaxb.version>
Expand Down Expand Up @@ -764,7 +764,7 @@ Copyright &copy; ${project.inceptionYear}-{currentYear} <a href="${project.organ
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.6.1</version>
<version>5.15.2</version>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
Expand Down
2 changes: 1 addition & 1 deletion droid-report/src/test/resources/jpa-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
datasource.driverClassName=org.apache.derby.iapi.jdbc.AutoloadedDriver
datasource.url=jdbc:derby:droid-test-db;create=true
datasource.username=droid_user
datasource.password=droid_user
Expand Down
2 changes: 1 addition & 1 deletion droid-results/src/main/resources/jpa.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
datasource.driverClassName=org.apache.derby.iapi.jdbc.AutoloadedDriver
datasource.username=droid_user
datasource.password=droid_user
datasource.maxActive=100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
*/
public class ProfileManagerImplTest {

private static final String DERBY_DRIVER_CLASSNAME = "org.apache.derby.jdbc.EmbeddedDriver";
private static final String DERBY_DRIVER_CLASSNAME = "org.apache.derby.iapi.jdbc.AutoloadedDriver";

private ProfileManagerImpl profileManager;
private ProfileSpecDao profileSpecDao;
Expand Down
2 changes: 1 addition & 1 deletion droid-results/src/test/resources/jpa-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

datasource.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
datasource.driverClassName=org.apache.derby.iapi.jdbc.AutoloadedDriver
datasource.url=jdbc:derby:target/droid-test-db;create=true
datasource.username=droid_user
datasource.password=droid_user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected void setup(FileSystemView view) {
FileNameExtensionFilter filter = new FileNameExtensionFilter("DROID 6 profile", "droid");
addChoosableFileFilter(filter);
setFileFilter(filter);
setMultiSelectionEnabled(false);
}

/**
Expand Down

0 comments on commit 4d4b93e

Please sign in to comment.