Skip to content

Commit

Permalink
Add more traces and get logs even if no failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed May 28, 2024
1 parent fae0d7f commit b41e659
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/test-permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
mvn clean install -Dts.bootable -Dtest=org.jboss.as.test.manualmode.secman.PermissionsDeploymentTestCase -Dtest.num.sleep=6
shell: bash
- name: Find reports
if: failure()
run: |
{
echo 'SUREFIRE_REPORTS<<EOF'
Expand All @@ -42,7 +41,6 @@ jobs:
} >> "$GITHUB_ENV"
shell: bash
- name: Find server logs
if: failure()
run: |
{
echo 'SERVER_LOGS<<EOF'
Expand All @@ -52,13 +50,11 @@ jobs:
shell: bash
- name: Upload Test Reports on Failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: ${{ env.SUREFIRE_REPORTS }}
- name: Upload Server Logs on Failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.os }}-${{ matrix.java }}
path: ${{ env.SERVER_LOGS }}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public FileVisitResult visitFile(final Path file, final BasicFileAttributes attr
Files.delete(file);
int num = holder.get(0);
if (num != 0) {
System.out.println("Sleeping for failure");
System.out.println("Sleeping for failure after having deleted " + file);
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
Expand All @@ -76,6 +76,8 @@ public FileVisitResult visitFile(final Path file, final BasicFileAttributes attr
num -=1;
holder.set(0, num);
}
} else {
System.out.println("CLEANUP PROCESS IGNORING MARKER FILE " + cleanupMarker);
}
} catch (IOException e) {
if (log) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,16 @@ public void testWithConfiguredMaxBootThreads() throws Exception {
@Test
public void testWithoutConfiguredMaxBootThreads() throws Exception {
for (int i = 0; i < 1000; i++) {
System.out.println("TEST START THE CONTAINER");
container.start();
try {
addDeploymentScanner(modelControllerClient, 1000, false, true);
this.testInvalidPermissionsXmlDeployment("test-permissions-xml-without-max-boot-threads.jar");
} finally {
removeDeploymentScanner(modelControllerClient);
System.out.println("TEST STOP THE CONTAINER");
container.stop();
System.out.println("TEST STOPPED THE CONTAINER");
}
}
}
Expand Down

0 comments on commit b41e659

Please sign in to comment.