Polish and revive disabled tests

This commit revives some previously disabled tests and converts
some usage of @Disabled to @EnabledForTestGroups(...).
This commit is contained in:
Sam Brannen
2019-09-06 15:57:27 +02:00
parent 35b967a801
commit 591995ecc8
7 changed files with 58 additions and 56 deletions

View File

@@ -27,13 +27,14 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashSet;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.tests.EnabledForTestGroups;
import org.springframework.util.FileCopyUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.springframework.tests.TestGroup.CI;
/**
* Unit tests for various {@link Resource} implementations.
@@ -218,10 +219,10 @@ class ResourceTests {
assertThat(relative).isEqualTo(new UrlResource("file:dir/subdir"));
}
@Disabled
@Test // this test is quite slow. TODO: re-enable with JUnit categories
@Test
@EnabledForTestGroups(CI)
void testNonFileResourceExists() throws Exception {
Resource resource = new UrlResource("https://www.springframework.org");
Resource resource = new UrlResource("https://spring.io/");
assertThat(resource.exists()).isTrue();
}