D2Session.testRPC is not reliable

#1

I wanted to use testRPC in D2JAPI and it works most of the time but sometimes it doesn’t. What’s wrong?

#2

What does mean “it works most of the time but sometimes it doesn’t”? Can you explain it more?

#3

I don’t know for sure, but when the application starts and I’m checking its configuration it works in 90% and in 10% fails. When I check it later, it always works

#4

Hello,
testRPC is not testing static configuration of scripts. It simulates runtime sending of callRPC message without actually executing RPC itself. When test finds its addressee, it succeeds, when it doesn’t it fails. At the application start-up time, processes need time for initialization and in your 10% of cases JAPI initialized before event.exe did, therefore your test failed.When you try it later, everything is already initialized and the test succeeds.