Skip to content

Commit

Permalink
[#31] Fixing failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
psiotwo committed Mar 18, 2021
1 parent e5b907c commit 38e1c08
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.jupiter.api.Test;

Expand Down Expand Up @@ -47,11 +46,8 @@ void processClassesSupportsSpringBootJarFiles() throws IOException, ClassNotFoun

void processClassesSupportsJarFiles(String jarFile, String pkg)
throws IOException {
// Empty consumer
ClassLoader loader = Thread.currentThread().getContextClassLoader();
URL url = loader.getResources("./bug-31/" + jarFile).nextElement();
ClassLoader classLoader = new URLClassLoader(new URL[] {url});
Thread.currentThread().setContextClassLoader(classLoader);
AtomicBoolean a = new AtomicBoolean(false);
final ClasspathScanner sut = new ClasspathScanner(cls -> {
a.set(true);
Expand Down

0 comments on commit 38e1c08

Please sign in to comment.