Plugin functional tests failed after move from version IU-2019.3 to IU-2020.1

Answered

I'm developing plugin https://github.com/nyavro/i18nPlugin.

Gradle fragment before change:

...
test {
intellij {
version 'IU-2019.3'
type "IC"
pluginName 'i18n'
plugins = [
'yaml',
'JavaScriptLanguage',
'CSS',
"org.jetbrains.plugins.vue:193.5233.118",
"com.jetbrains.php:193.5233.102",
"org.jetbrains.plugins.localization:193.5233.70"
]
}
...
}
...

After change:

...
test {
intellij {
version 'IU-2020.1'
type "IC"
pluginName 'i18n'
plugins = [
'yaml',
'JavaScriptLanguage',
'CSS',
"org.jetbrains.plugins.vue:201.6668.153",
"com.jetbrains.php:201.6668.153",
"org.jetbrains.plugins.localization:201.6668.60"
]
}
...
}
...

I've got numerous of test failures. 
Looks like tests environment does not 'see' plugin.xml file, so my custom completion contributors, inspections, reference contributors do not gets loaded and applied to test cases. 
I also see implicit messages like:

java.lang.IllegalStateException: ServiceManager.getServic…ct, Settings::class.java) must not be null

running

ServiceManager.getService(project, Settings::class.java)

 this also approves my theory that there is something wrong with plugin.xml loading or injection framework.
How to fix it?

2 comments
Comment actions Permalink

1) please upgrade gradle-intellij-plugin to latest version (0.6.5) _always_ 0.4.16 doesn't work with latest releases of IDE

2) "intellij" block should be outside out "test" block

3) there should be only one top-level "intellij" block, you have two

4) in "intellij" block, you have conflicting "version" requiring Ultimate (IU-xxx) with "type=IC" specifying Community Edition. please see https://github.com/JetBrains/gradle-intellij-plugin/#intellij-platform-properties for proper values

I

1
Comment actions Permalink

Thanks a lot! 
The answer was very helpful, I'm very appreciated for your help!

0

Please sign in to leave a comment.