Description. Explicitly causing a thread to sleep can lead to unexpected results as the processing time for a task can differ on different devices. Developers introduce this smell when they need to pause execution of statements in a test method for a certain duration (i.e. simulate an external event) and then continuing with execution.
Detection. A test method that invokes the Thread.sleep() method.
Problem. It should detect only the line of the test method where the thread.sleep is being used, not the whole method.
Description. Explicitly causing a thread to sleep can lead to unexpected results as the processing time for a task can differ on different devices. Developers introduce this smell when they need to pause execution of statements in a test method for a certain duration (i.e. simulate an external event) and then continuing with execution.
Detection. A test method that invokes the Thread.sleep() method.
Problem. It should detect only the line of the test method where the thread.sleep is being used, not the whole method.