Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/test/groovy/org/eolang/lints/HomeNamesTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package org.eolang.lints
import com.yegor256.MayBeSlow
import java.nio.file.Path
import java.nio.file.Paths
import java.util.concurrent.TimeUnit
import org.hamcrest.MatcherAssert
import org.hamcrest.Matchers
import org.junit.jupiter.api.Tag
Expand All @@ -24,6 +25,7 @@ import org.junit.jupiter.api.io.TempDir
@ExtendWith(MayBeSlow)
final class HomeNamesTest {

@Timeout(unit = TimeUnit.MINUTES, value = 3L)
@Test
void placesHomeObjectsAsReserved(@TempDir final Path temp) {
final String csv = temp.resolve("reserved.csv").toString()
Expand All @@ -35,6 +37,7 @@ final class HomeNamesTest {
)
}

@Timeout(unit = TimeUnit.MINUTES, value = 3L)
@Test
void placesHomeObjectsWithCorrectNames(@TempDir final Path temp) {
final String csv = temp.resolve("reserved.csv").toString()
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/org/eolang/lints/LtByXslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -359,7 +360,7 @@ void doesNotDuplicateDefectsWhenMultipleDefectsOnTheSameLine() throws Exception

@SuppressWarnings("StreamResourceLeak")
@Tag("deep")
@Timeout(180L)
@Timeout(unit = TimeUnit.MINUTES, value = 5L)
@Test
void validatesEoPacksForErrors() throws IOException {
Files.walk(Paths.get("src/test/resources/org/eolang/lints/packs/single"))
Expand Down
8 changes: 7 additions & 1 deletion src/test/java/org/eolang/lints/SourceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.cactoos.bytes.BytesOf;
Expand Down Expand Up @@ -61,12 +62,17 @@
* Test for {@link Source}.
*
* @since 0.0.1
* @todo #767:60min Decrease timeouts for source linting.
* As for now, most lints are too slow, we need to optimize them first, so they
* run in milliseconds, not seconds/minutes. It should decrease our build time too.
* After that, we need to decrease our test timeouts. Don't forget to remove this puzzle.
* @checkstyle MethodBodyCommentsCheck (50 lines)
*/
@SuppressWarnings("PMD.TooManyMethods")
@ExtendWith(MktmpResolver.class)
final class SourceTest {

@Timeout(unit = TimeUnit.SECONDS, value = 60L)
@Test
void returnsEmptyListOfDefects() throws IOException {
MatcherAssert.assertThat(
Expand Down Expand Up @@ -144,7 +150,7 @@ void checksSimple(@Mktmp final Path dir) throws IOException {
}

@Tag("deep")
@Timeout(60L)
@Timeout(unit = TimeUnit.MINUTES, value = 2L)
@RepeatedTest(2)
void lintsInMultipleThreads() {
MatcherAssert.assertThat(
Expand Down