Skip to content

Commit

Permalink
Merge pull request #1428 from ashitsalesforce/master
Browse files Browse the repository at this point in the history
check if test is running slower than usual
  • Loading branch information
ashitsalesforce authored Dec 30, 2024
2 parents 79d03ba + 67717f7 commit 811dfaa
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import java.util.Map;
import java.util.TimeZone;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -70,7 +72,19 @@
@RunWith(Parameterized.class)
@SuppressWarnings("unused")
public class CsvProcessTest extends ProcessTestBase {
private static long startTime = 0;
@BeforeClass
public static void setUpBeforeClass() {
startTime = System.currentTimeMillis();
}

@AfterClass
public static void tearDownAfterClass() {
long endTime = System.currentTimeMillis();
long elapsedTimeInMinutes = (endTime - startTime) / 60000;
assertTrue("Tests slowed down by more than 1 minute", elapsedTimeInMinutes < 15);
}

public CsvProcessTest(Map<String, String> config) {
super(config);
}
Expand Down

0 comments on commit 811dfaa

Please sign in to comment.