This is for cloud (not on-prem) Apigee. I have a Java functional TestNG test which is hitting a REST API endpoint.
Same test worked on Windows PC with IntelliJ and JBoss with no special settings.
I can hit this endpoint in Postman, so I know it's up/alive!
We also made a simple Node Express server / Java ping program that listens on various ports (e.g. in the 6xxxx range) and replies if the ping was successful. This works in IntelliJ.
But in IntelliJ and JBoss Dev Studio IDEs AND on mvn test commandline (!) on Mac, it fails immediately, doesn't even touch any of my test code, and I get:
Connected to the target VM, address:'127.0.0.1:60329', transport:'socket'[TestNG]Running:
java.net.ConnectException:Connection refused
at java.net.PlainSocketImpl.socketConnect(NativeMethod)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
...
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:74)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:124)
I've tried a few things with no luck:
Versions:
Solved! Go to Solution.
Well, I ended up deleting my entire set of Git repos and starting over from scratch. My TestNG tests are now running. Why that worked? I have no idea. Just glad to get back to work.