Github user koushik-das commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/656#discussion_r36170828
  
    --- Diff: server/test/com/cloud/ha/HighAvailabilityManagerImplTest.java ---
    @@ -113,12 +110,18 @@
         public void setup() throws IllegalArgumentException,
                 IllegalAccessException, NoSuchFieldException, 
SecurityException {
             highAvailabilityManager = new HighAvailabilityManagerImpl();
    -        for (Field injectField : HighAvailabilityManagerImpl.class
    -                .getDeclaredFields()) {
    +        for (Field injectField : 
HighAvailabilityManagerImpl.class.getDeclaredFields()) {
                 if (injectField.isAnnotationPresent(Inject.class)) {
                     injectField.setAccessible(true);
    -                injectField.set(highAvailabilityManager, this.getClass()
    -                        
.getDeclaredField(injectField.getName()).get(this));
    +                injectField.set(highAvailabilityManager, 
this.getClass().getDeclaredField(injectField.getName()).get(this));
    +            } else if (injectField.getName().equals("_workers")) {
    --- End diff --
    
    Yes. "_workers" is the set of worker threads that perform HA related tasks 
in HighAvaiabilityManagerImpl class. As part of the test wakeupWorkers() 
methods get invoked which needs _workers to be initialized.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to