Debug logging for hung test
This commit is contained in:
@@ -25,8 +25,6 @@ import java.util.stream.Collectors;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.ide.vscode.boot.metadata.CachingValueProvider;
|
||||
import org.springframework.ide.vscode.boot.metadata.LoggerNameProvider;
|
||||
import org.springframework.ide.vscode.commons.maven.java.MavenJavaProject;
|
||||
import org.springframework.ide.vscode.project.harness.ProjectsHarness;
|
||||
|
||||
@@ -59,7 +57,9 @@ public class LoggerNameProviderTest {
|
||||
@BeforeEach
|
||||
public void setup() throws Exception {
|
||||
CachingValueProvider.TIMEOUT = Duration.ofSeconds(20);
|
||||
System.out.println("Setting test up.");
|
||||
project = projects.mavenProject("tricky-getters-boot-1.3.1-app");
|
||||
System.out.println("Done setting test up: ");
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
@@ -69,6 +69,7 @@ public class LoggerNameProviderTest {
|
||||
|
||||
@Test
|
||||
void directResults() throws Exception {
|
||||
System.out.println("directResults() - start");
|
||||
LoggerNameProvider p = create();
|
||||
String query = "jboss";
|
||||
List<String> directQueryResults = getResults(p, query);
|
||||
@@ -80,10 +81,12 @@ public class LoggerNameProviderTest {
|
||||
*/
|
||||
// assertElements(directQueryResults, JBOSS_RESULTS);
|
||||
assertElementsAtLeast(directQueryResults, JBOSS_RESULTS);
|
||||
System.out.println("directResults() - end");
|
||||
}
|
||||
|
||||
@Test
|
||||
void cachedResults() throws Exception {
|
||||
System.out.println("cachedResults() - start");
|
||||
LoggerNameProvider p = create();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
@@ -99,10 +102,12 @@ public class LoggerNameProviderTest {
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
System.out.println(i + ": " + duration + " ms");
|
||||
}
|
||||
System.out.println("cachedResults() - end");
|
||||
}
|
||||
|
||||
@Test
|
||||
void incrementalResults() throws Exception {
|
||||
System.out.println("incrementalResults() - start");
|
||||
String fullQuery = "jboss";
|
||||
|
||||
LoggerNameProvider p = create();
|
||||
@@ -118,6 +123,7 @@ public class LoggerNameProviderTest {
|
||||
assertElementsAtLeast(results, JBOSS_RESULTS);
|
||||
}
|
||||
}
|
||||
System.out.println("incrementalResults() - end");
|
||||
}
|
||||
|
||||
private LoggerNameProvider create() {
|
||||
|
||||
Reference in New Issue
Block a user