Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8248551

[TestBug] Ignore two failing FXML unit tests which use Nashorn script engine

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: openjfx15
    • Fix Version/s: openjfx15
    • Component/s: javafx
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Two of the FXML unit tests use the Nashorn JavaScript engine to test the FXML scripting capability. Nashorn has been deprecated since JDK 11 and has been removed in JDK 15.

      When running with JDK 15-ea these two tests fail (as expected, since Nashorn is gone).

      test.javafx.fxml.FXMLLoader_ScriptTest > testScriptHandler FAILED
          javafx.fxml.LoadException: Page language not specified.
          /C:/Users/kcr/javafx/jfx-kcr/jfx/rt/modules/javafx.fxml/build/resources/test/test/javafx/fxml/script_handler.fxml:35
              at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
              at javafx.fxml/javafx.fxml.FXMLLoader$ScriptElement.processCharacters(FXMLLoader.java:1604)
              at javafx.fxml/javafx.fxml.FXMLLoader.processCharacters(FXMLLoader.java:2855)
              at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
              at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
              at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2439)
              at test.javafx.fxml.FXMLLoader_ScriptTest.testScriptHandler(FXMLLoader_ScriptTest.java:134)

      test.javafx.fxml.FXMLLoader_ScriptTest > testExternalScriptHandler FAILED
          javafx.fxml.LoadException: Unable to locate scripting engine for extension js.
          /C:/Users/kcr/javafx/jfx-kcr/jfx/rt/modules/javafx.fxml/build/resources/test/test/javafx/fxml/script_handler_external.fxml:31
              at javafx.fxml/javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
              at javafx.fxml/javafx.fxml.FXMLLoader$ScriptElement.processStartElement(FXMLLoader.java:1544)
              at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2726)
              at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2556)
              at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
              at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2439)
              at test.javafx.fxml.FXMLLoader_ScriptTest.testExternalScriptHandler(FXMLLoader_ScriptTest.java:147)


      These tests should be ignored if Nashorn script engine is not available.

      In future, these tests will be rewritten/replaced under JDK-8245568.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aghaisas Ajit Ghaisas
              Reporter:
              aghaisas Ajit Ghaisas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: