Skip to content

TaskWindowTest running as a flaky test due to concurrency issues #2242

Description

@laim2003

Actual behavior

The TaskWindowTest turns out to be flaky due to some list operations that can cause issues when GitHub Actions runs the test in a concurrent manner:

com.devonfw.ide.gui.progress.TaskWindowTest.listContentsAreCoherent -- Time elapsed: 0.311 s <<< ERROR!
java.util.ConcurrentModificationException
	at java.base/java.util.AbstractList$RandomAccessSpliterator.checkAbstractListModCount(AbstractList.java:745)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.tryAdvance(AbstractList.java:709)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:147)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:588)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:574)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:668)
	at com.devonfw.ide.gui.context.TaskManager.addTask(TaskManager.java:28)
	at com.devonfw.ide.gui.progress.TaskWindowTest.listContentsAreCoherent(TaskWindowTest.java:111)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

Reproduce

As this is a flaky test it will sometimes occur during PR builds. Reproduction is therefore very hard, but you can see this error occurring in this PR build: https://github.com/devonfw/IDEasy/actions/runs/30631287562/job/91157973779

Expected behavior

Test should not get a ConcurrentModificationException.

IDEasy status

Updates are available for the settings repository. If you want to apply the latest changes, call "ide update"
IDE_ROOT is set to C:\Users\lfaber\projects
IDE_HOME is set to C:\Users\lfaber\projects\ideasy
Your version of IDEasy is 2026.08.001-07_31_05-SNAPSHOT.
You are using a SNAPSHOT version of IDEasy. For stability consider switching to a stable release via 'ide upgrade --mode=stable'
Your are using the latest snapshot version of IDEasy and no update is available.
Your operating system is windows(10.0)@x64 [Windows 11@amd64]
You are online.
Found bash executable at: C:\Program Files\Git\usr\bin\bash.exe
Found git executable at: C:\Program Files\Git\cmd\git.exe
Your settings are not up-to-date, please run 'ide update'.
Successfully completed ide (status)

Please use (git-)bash (integrated in Windows Terminal) for full IDEasy support:
https://github.com/devonfw/IDEasy/blob/main/documentation/advanced-tooling-windows.adoc#tabs-for-shells

Related/Dependent issues

No response

Comments/Hints

No response

Metadata

Metadata

Assignees

Labels

internalNothing to be added to CHANGELOG, only internal storytestrelated to testing and QA

Type

Projects

Status
🏗 In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions