Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decreased the sleep timers for JUnit tests #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/javasource/unittesting/UnittestingUnitTest1.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class UnittestingUnitTest1
@Before
public void setup() throws InterruptedException {
this.state = false;
Thread.sleep(1000);
Thread.sleep(10);
}

@Test
public void testOfOneSecondSetupAndOneSecundRun() throws InterruptedException {
public void testOfOneMsSecondSetupAndOneMsSecundRun() throws InterruptedException {
this.state = true;
TestManager.instance().reportStep("Sleeping a while");
Thread.sleep(1000);
Thread.sleep(10);
TestManager.instance().reportStep("Sleeping done!");
assertTrue(state);
}
Expand Down
6 changes: 3 additions & 3 deletions src/javasource/unittesting/UnittestingUnitTest2.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ public class UnittestingUnitTest2 extends AbstractUnitTest

@Before
public void setup() throws InterruptedException {
Thread.sleep(500);
Thread.sleep(5);
}

@After
public void tearDown() throws InterruptedException {
Thread.sleep(500);
Thread.sleep(5);
}

@Test
public void evenMoreUnitTests() throws InterruptedException {
this.startTimeMeasure();

this.reportStep("By inheriting from AbstractUnitTest some utility methods are provided and time can be tracted in a more reliable way (without counting setup and teardown)");
Thread.sleep(1000);
Thread.sleep(10);

assertTrue(true);

Expand Down