Skip to content

Commit 483d0f8

Browse files
committed
Fixed module tests
1 parent b3eaad1 commit 483d0f8

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

webrtc/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@
1010

1111
<artifactId>webrtc-java</artifactId>
1212

13+
<build>
14+
<plugins>
15+
<plugin>
16+
<groupId>org.apache.maven.plugins</groupId>
17+
<artifactId>maven-surefire-plugin</artifactId>
18+
<configuration>
19+
<argLine>
20+
--add-opens webrtc.java/dev.onvoid.webrtc=ALL-UNNAMED
21+
--add-opens webrtc.java/dev.onvoid.webrtc.logging=ALL-UNNAMED
22+
--add-opens webrtc.java/dev.onvoid.webrtc.media=ALL-UNNAMED
23+
--add-opens webrtc.java/dev.onvoid.webrtc.media.audio=ALL-UNNAMED
24+
--add-opens webrtc.java/dev.onvoid.webrtc.media.video=ALL-UNNAMED
25+
</argLine>
26+
<forkCount>2</forkCount>
27+
</configuration>
28+
</plugin>
29+
</plugins>
30+
</build>
31+
1332
<profiles>
1433
<profile>
1534
<id>linux-x86_64</id>

webrtc/src/main/java/dev/onvoid/webrtc/internal/NativeLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static void loadLibrary(final String libName) throws Exception {
5858
Path tempPath = Files.createTempFile(tempName, ext);
5959
File tempFile = tempPath.toFile();
6060

61-
try (InputStream is = NativeLoader.class.getResourceAsStream("/" + libFileName)) {
61+
try (InputStream is = NativeLoader.class.getClassLoader().getResourceAsStream(libFileName)) {
6262
Files.copy(is, tempPath, StandardCopyOption.REPLACE_EXISTING);
6363
}
6464
catch (Exception e) {

0 commit comments

Comments
 (0)