Skip to content

Commit

Permalink
check if test is running slower than usual
Browse files Browse the repository at this point in the history
check if test is running slower than usual
  • Loading branch information
ashitsalesforce committed Dec 30, 2024
1 parent 4b13405 commit 67717f7
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 67717f7

Please sign in to comment.