Problem
A TestNG project used worked with 2021.1.3. However, after the user installed 2024.1, running the same testng run config stopped working due to the error below. The test suite opens a browser and accesses a URL. The user used to work fine on the same machine with 2021.1.3. The custom VM options are the same between versions.
org.testng.TestNGException: java.net.ConnectException: Connection timed out: connect
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:341)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:39)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
...
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1304)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1270)
...
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at org.testng.xml.XMLParser.parse(XMLParser.java:39)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:1)
at org.testng.xml.Parser.parse(Parser.java:168)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
... 2 more
Cause
Old version of TestNG doesn't support offline usage, see: https://github.com/testng-team/testng/pull/2386
Resolution
Updating the TestNG used in the project to version 7.4.0 or higher helps to fix this issue.
Comments
0 comments
Please sign in to leave a comment.