Skip to content

Commit

Permalink
Use Thread Context ClassLoader to find test resources
Browse files Browse the repository at this point in the history
  • Loading branch information
holly-cummins committed Sep 17, 2022
1 parent ef2fc84 commit 873b0e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class PactFolderLoader : PactLoader {
override fun getPactSource() = this.pactSource

private fun resolvePath(): File {
val resourcePath = PactFolderLoader::class.java.classLoader.getResource(path.path)
val resourcePath = Thread.currentThread().getContextClassLoader().getResource(path.path)
return if (resourcePath != null) {
File(URLDecoder.decode(resourcePath.path, "UTF-8"))
} else {
Expand Down

0 comments on commit 873b0e5

Please sign in to comment.