D2Session.testRPC is not reliable

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

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

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

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.