Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[jvm] duplicated filename creates exceptions when updating snapshot

Open
#552 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
kotlin
Domain
testing

Research direction

Start by reproducing the snapshot update with tests that use the same filename in different packages. Trace how snapshot files are selected and how inline assertions are located when testPlanExecutionFinished runs. Done means duplicate filenames resolve to the correct content and the overwrite assertion completes without the reported exception.

Written by the indexing model from the issue text.

Description

bug jvm

There is a possible issue that I encountered with duplicated file names of tests. (in different packages). The assertion was marked for overwrite with toBe_TODO() and the following exception was thrown:

[com.diffplug.selfie.junit5.SelfieTestExecutionListener] threw exception for method: testPlanExecutionFinished(org.junit.platform.launcher.TestPlan@65b49da9) java.lang.AssertionError: Expected to find inline assertion on line ... 

With some debugging i found that there was a file with a identical name red with different content instead of the correct one, before the exception was thrown.

Also I'm not sure if this a known limitation or a bug

Dominant language
Kotlin
Stars
101
Forks
18
Avg merge
6d 11h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/selfie

All issues in diffplug/selfie

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.