[JBIDE-22127] chanch WatchClient synch blocks to minimize blocking#145
[JBIDE-22127] chanch WatchClient synch blocks to minimize blocking#145jcantrill wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
[test] |
f472fed to
aa4bed8
Compare
aa4bed8 to
402517e
Compare
|
Evaluated for javaclient test up to 402517e |
|
Java Client Test Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test-openshift-restclient-java/102/) |
|
Seems much faster now and I couldn't reproduce any blocking issue. So that counts as +1 from me. @scabanovich, @alexeykazakov, @adietish, @jeffmaury any 2nd opinion on this change? |
|
this requires us to deploy a 4.0.2.Final artifact to repository.jboss.org and reference it in JBoss Tools. |
| lockTimeout = Long.parseLong(System.getProperty("com.openshift.restclient.watchlocktimeoutms", "30000")); | ||
| }catch(NumberFormatException e) { | ||
| lockTimeout = 30 * 1000; | ||
| } |
There was a problem hiding this comment.
can we please extract this try/catch-block to a method with a speaking name like #getLockTimeout?
|
i made my suggested changes in #146 |
| } catch (Exception e) { | ||
| throw createOpenShiftException(String.format("Could not start watchClient"),e); | ||
| } | ||
| if(status.get().equals(Status.Started) || status.get().equals(Status.Starting)) { |
There was a problem hiding this comment.
enums should be compared with ==, no #equals, like you already do when starting (line 210)
|
supplanted by #146 with minor changes |
ptl @adietish @fbricon