Skip to content

Commit e84d328

Browse files
committed
Fix envers test on Windows
1 parent 8482ef2 commit e84d328

File tree

1 file changed

+5
-4
lines changed
  • hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/blob

1 file changed

+5
-4
lines changed

hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/blob/BasicBlobTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import java.io.BufferedInputStream;
2222
import java.io.InputStream;
23+
import java.net.URISyntaxException;
2324
import java.nio.file.Files;
2425
import java.nio.file.Path;
2526
import java.sql.Blob;
@@ -40,9 +41,9 @@ protected Class<?>[] getAnnotatedClasses() {
4041

4142
@Test
4243
@Priority(10)
43-
public void testGenerateProxyNoStream() {
44+
public void testGenerateProxyNoStream() throws URISyntaxException {
4445
final Path path = Path.of( Thread.currentThread().getContextClassLoader()
45-
.getResource( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).getPath() );
46+
.getResource( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).toURI() );
4647
doInJPA( this::entityManagerFactory, entityManager -> {
4748
final Asset asset = new Asset();
4849
asset.setFileName( "blob.txt" );
@@ -84,9 +85,9 @@ public void testGenerateProxyNoStream() {
8485
comment = "The driver closes the stream, so it cannot be reused by envers")
8586
@SkipForDialect(value = SybaseDialect.class,
8687
comment = "The driver closes the stream, so it cannot be reused by envers")
87-
public void testGenerateProxyStream() {
88+
public void testGenerateProxyStream() throws URISyntaxException {
8889
final Path path = Path.of( Thread.currentThread().getContextClassLoader()
89-
.getResource( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).getPath() );
90+
.getResource( "org/hibernate/orm/test/envers/integration/blob/blob.txt" ).toURI() );
9091

9192
try (final InputStream stream = new BufferedInputStream( Files.newInputStream( path ) )) {
9293
doInJPA( this::entityManagerFactory, entityManager -> {

0 commit comments

Comments
 (0)