Stacktrace displayed in MUnit test that intercepts the exception
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 175
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 9
Description
I'm running a few tests which I expect to fail with a Skunk exception. The tests pass but Skunk displays the exception in the console. This isn't a problem it's just mildly annoying.
Here's a snippet of my test
IO(dbWorker())
.flatMap(sessionPool =>
sessionPool.use(session =>
val res = for
service <- sciServiceFromSession(session)
_ <- service.signup(sciWithPasswd1)
_ <- service.signup(sciWithPasswd2)
yield ()
// check that the IO throws an exception
res.intercept[skunk.exception.PostgresErrorException]
)
)
And here's a screenshot of the test being run:

Also as a side note, noticed the strange font of the stacktrace is this because I'm running it on Windows and the terminal can't render the font properly?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported MUnit test using res.intercept[skunk.exception.PostgresErrorException] and observe how Skunk reports the intercepted exception. Check whether the console stacktrace and its font rendering are produced by the test runner or Skunk; done means the expected intercepted exception no longer produces the unwanted console output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres, scala
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100