Skip to content

Exception on Linux - com.intellij.testFramework.TestLoggerFactory$TestLoggerAssertionError: Must be precomputed #6

@Jonatha1983

Description

@Jonatha1983

Stack trace:

com.intellij.testFramework.TestLoggerFactory$TestLoggerAssertionError: Must be precomputed
at com.intellij.testFramework.TestLoggerFactory$TestLogger.error(TestLoggerFactory.java:457) |  
-- | --
  |   | at com.intellij.openapi.diagnostic.Logger.error(Logger.java:374) |  
  |   | at com.intellij.ui.scale.JBUIScale.computeSystemScaleFactor(JBUIScale.kt:223) |  
  |   | at com.intellij.ui.scale.JBUIScale.systemScaleFactor$lambda$1(JBUIScale.kt:96) |  
  |   | at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41) |  
  |   | at java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210) |  
  |   | at com.intellij.util.concurrency.SynchronizedClearableLazy.getValue(SynchronizedClearableLazy.kt:40) |  
  |   | at com.intellij.ui.scale.JBUIScale.computeUserScaleFactor(JBUIScale.kt:306) |  
  |   | at com.intellij.ui.scale.JBUIScale.userScaleFactor$lambda$0(JBUIScale.kt:43) |  
  |   | at com.intellij.util.concurrency.SynchronizedClearableLazy._get_value_$lambda$1$lambda$0(SynchronizedClearableLazy.kt:41) |  
  |   | at java.util.concurrent.atomic.AtomicReference.updateAndGet(AtomicReference.java:210)

Additional Context: This issue only occurs on Linux when running UI tests with the starter and driver framework.
The issue can be resolved by adding the following properties to Starter.newContext:

addSystemProperty("ide.ui.scale", "1.0")
addSystemProperty("hidpi", "false")
addSystemProperty("ide.ui.scale.override", "1.0")
addSystemProperty("sun.java2d.uiScale", "1.0")
addSystemProperty("awt.useSystemAAFontSettings", "off")

After adding these properties, the tests run successfully on Linux environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions