Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
donat committed Jun 12, 2024
1 parent 376528c commit 434ede8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ subprojects {
languageVersion = JavaLanguageVersion.of(8)
}
}
} else if (config.targetPlatform.eclipseVersion in ['417', '418', '419', '420', '21', '422', '423', '424'])) {
} else if (config.targetPlatform.eclipseVersion in ['417', '418', '419', '420', '21', '422', '423', '424']) {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ProjectConfigurationTest extends ProjectSynchronizationSpecification {

when:
configurationManager.saveProjectConfiguration(projectConfig)
configurationManager.saveWorkspaceConfiguration(new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSync, arguments, jvmArguments, showConsole, showExecutions, false))
configurationManager.saveWorkspaceConfiguration(new WorkspaceConfiguration(distribution, gradleUserHome, javaHome, offlineMode, buildScansEnabled, autoSync, arguments, jvmArguments, showConsole, showExecutions, false, false))
projectConfig = configurationManager.loadProjectConfiguration(project)

then:
Expand Down Expand Up @@ -224,7 +224,7 @@ class ProjectConfigurationTest extends ProjectSynchronizationSpecification {

when:
configurationManager.saveProjectConfiguration(projectConfig)
configurationManager.saveWorkspaceConfiguration(new WorkspaceConfiguration(GradleDistribution.fromBuild(), null, null, !buildScansEnabled, !offlineMode, !autoSync, [], [], false, false, false))
configurationManager.saveWorkspaceConfiguration(new WorkspaceConfiguration(GradleDistribution.fromBuild(), null, null, !buildScansEnabled, !offlineMode, !autoSync, [], [], false, false, false, false))
projectConfig = configurationManager.loadProjectConfiguration(project)

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ abstract class WorkspaceSpecification extends Specification {
}

protected List<IMarker> getGradleErrorMarkers(IResource rootResource = workspace.root) {
rootResource.findMarkers(GradleErrorMarker.ID, false, IResource.DEPTH_INFINITE) as List
// error markers created from Tooling API problem events are filtered
(rootResource.findMarkers(GradleErrorMarker.ID, false, IResource.DEPTH_INFINITE) as List).findAll { IMarker m -> m.getAttribute(GradleErrorMarker.ATTRIBUTE_ID, null) == null }
}

protected List<IStatus> getPlatformLogErrors() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ class SynchronizingBuildScriptUpdateListenerTest extends ProjectSynchronizationS
workspaceConfig.jvmArguments,
workspaceConfig.showConsoleView,
workspaceConfig.showExecutionsView,
false,
false)
configurationManager.saveWorkspaceConfiguration(workspaceConfig)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AddBuildshipNatureHandlerTest extends WorkspaceSpecification {
def "Uses configuration from workspace settings"() {
setup:
WorkspaceConfiguration originalWorkspaceConfig = configurationManager.loadWorkspaceConfiguration()
WorkspaceConfiguration config = new WorkspaceConfiguration(GradleDistribution.forVersion("3.0"), dir('custom-gradle-home'), null, false, false, false, [], [], false, false, false)
WorkspaceConfiguration config = new WorkspaceConfiguration(GradleDistribution.forVersion("3.0"), dir('custom-gradle-home'), null, false, false, false, [], [], false, false, false, false)
configurationManager.saveWorkspaceConfiguration(config)

IProject project = EclipseProjects.newProject('add-buildship-nature')
Expand Down

0 comments on commit 434ede8

Please sign in to comment.