Add timeout on Javascript latch awaits 99/104399/1
authorliamfallon <liam.fallon@est.tech>
Wed, 25 Mar 2020 17:35:43 +0000 (17:35 +0000)
committerliamfallon <liam.fallon@est.tech>
Wed, 25 Mar 2020 17:38:25 +0000 (17:38 +0000)
commit4f0708ce15cc62662e3746262e8092913c24906e
tree197d835a1631916c618a5a6b9d3ba1f3dae67c0d
parent9aa62b777ddcd25665fdc1544934c133e0124230
Add timeout on Javascript latch awaits

It is possible that the initiation and especially shutdown happens so
fast that the execution thread counts down the latch before the caller
calls await(), in which case the Javascript Rhino thread will hang. This
review adds a timeout on the await calls.

Issue-ID: POLICY-2106
Change-Id: Icfc6d4b478cca62522461c25d61ce9ee7328684a
Signed-off-by: liamfallon <liam.fallon@est.tech>
plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutor.java