Skip to content

Commit

Permalink
Wrap atom close which seems to be failing with concurrent modificatio…
Browse files Browse the repository at this point in the history
…n exception in CI

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Nov 2, 2023
1 parent adfe8e8 commit 6b5e68f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/repotests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ jobs:
- run: |
./atom.sh usages -o /tmp/v8.atom -l h $GITHUB_WORKSPACE/repotests/nodejs/deps/v8 -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/v8.slices.json
./atom.sh usages -o /tmp/uv.atom -l h $GITHUB_WORKSPACE/repotests/nodejs/deps/uv -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/uv.slices.json
./atom.sh usages -o /tmp/openssl.atom -l h $GITHUB_WORKSPACE/repotests/nodejs/deps/openssl -Dlog4j.configurationFile=log4j2.xml --slice-outfile /tmp/openssl.slices.json
env:
JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF-8"
if: runner.os != 'Windows'
Expand Down
7 changes: 6 additions & 1 deletion src/main/scala/io/appthreat/atom/Atom.scala
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,12 @@ object Atom {
case _ =>
}
generateSlice(config, ag)
ag.close()
try {
ag.close()
} catch {
case err: Throwable if err.getMessage == null => Left(err.getStackTrace.take(7).mkString("\n"))
case err: Throwable => Left(err.getMessage)
}
Right("Atom generation successful")
}
}
Expand Down

0 comments on commit 6b5e68f

Please sign in to comment.