Thread synchro

Open
#258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reviewing the Thread that launches ApplicationLauncher and the subsequent robot() calls, focusing on how startup completion is detected. The issue mentions Thread.sleep() as the current timing workaround; done should be a reliable synchronization approach that prevents inputs from running before the application is ready.

Written by the indexing model from the issue text.

Description

Hello!

the question is little stupid, but unfortunality I don't have any experiences in threads.
I'm testing a complex program and call the main-class with:

		Thread thread = new Thread() {
			public void run() {
				ApplicationLauncher withArgs = application(Main.class).withArgs("option1=on");
				withArgs.start();
			}
		};
		thread.start();

When I don't to this in an extra thread the next inputs via robot() won't get executed.
However, I inserted multipled Thread.sleep()-methods, because the program takes a while to start, and without them the input are too early.

All in all I'm unsure if I do aything extremly wrong here - could anyone give me a hint?

Would be very nice!
Thanks

Hans

Dominant language
Java
Stars
121
Forks
52
PR merge metrics
No merged PRs in 30d

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 assertj/assertj-swing

All issues in assertj/assertj-swing

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.