Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find tests in Gradle project #679

Closed
lyneca opened this issue Apr 12, 2019 · 1 comment
Closed

Unable to find tests in Gradle project #679

lyneca opened this issue Apr 12, 2019 · 1 comment

Comments

@lyneca
Copy link

lyneca commented Apr 12, 2019

I'm unable to refresh the test explorer window. I'm able to run tests fine from the inline "Run Test" button in the editor, but hitting refresh (or on first loading a project) returns:

Under the Java Test Runner output section:

Error.

Under the Language Support for Java output section

[Error - 12:55:34 AM] Apr 13, 2019 12:55:34 AM Error in calling delegate command handler
null
java.lang.NullPointerException
	at com.microsoft.java.test.plugin.util.TestSearchUtils.searchInPackage(TestSearchUtils.java:344)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.searchTestItems(TestSearchUtils.java:142)
	at com.microsoft.java.test.plugin.handler.TestDelegateCommandHandler.executeCommand(TestDelegateCommandHandler.java:46)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:151)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:141)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$4(JDTLanguageServer.java:419)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$32(JDTLanguageServer.java:803)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

My build.gradle:

/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java project to get you started.
 * For more details take a look at the Java Quickstart chapter in the Gradle
 * User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
 */

plugins {
    // Apply the java plugin to add support for Java
    id 'java'

    // Apply the application plugin to add support for building an application
    id 'application'
}

repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
}

dependencies {
    // This dependency is found on compile classpath of this component and consumers.
    implementation 'com.google.guava:guava:27.0.1-jre'

    // Use JUnit test framework
    testImplementation 'junit:junit:4.12'
}

Testing the sample project works fine and is able to find all tests, so let me know if you need more info about my project structure/config.

@lyneca
Copy link
Author

lyneca commented Apr 12, 2019

Sorry, duplicate of #611

@lyneca lyneca closed this as completed Apr 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant