minor fixes

Original commit: elastic/x-pack-elasticsearch@6dae7b4ee6
This commit is contained in:
Areek Zillur 2014-11-04 17:38:14 -05:00
parent 73754767dd
commit 93944f27f2
2 changed files with 8 additions and 3 deletions

View File

@ -51,6 +51,11 @@ import static org.elasticsearch.license.core.ESLicenses.reduceAndMap;
* - LicensesManagerService - responsible for managing signed and one-time-trial licenses
* - LicensesClientService - responsible for feature registration and notification to consumer plugin(s)
* <p/>
* Registration Scheme:
* A consumer plugin (feature) is registered with {@link LicensesClientService#register(String, TrialLicenseOptions, LicensesClientService.Listener)}
* This method can be called at any time during the life-cycle of the consumer plugin.
*
*
* <p/>
* Notification Scheme:
* <p/>
@ -430,6 +435,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
return;
}
notifyFeaturesAndScheduleNotification(currentLicensesMetaData);
lastObservedLicensesState.set(currentLicensesMetaData);
}
/**
@ -495,7 +501,6 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
}
}
lastObservedLicensesState.set(currentLicensesMetaData);
return nextScheduleFrequency;
}

View File

@ -293,7 +293,7 @@ public class LicensesServiceTests extends AbstractLicensesIntegrationTests {
}
putAndCheckSignedLicensesAction(masterLicensesManagerService, Arrays.asList(license), LicensesStatus.VALID);
}
}, 0, 1, "should trigger onEnable once [signed license]");
}, 0, 1, "should trigger onEnable for " + feature + " once [signed license]");
}
private Action registerWithoutTrialLicense(final LicensesClientService clientService, final LicensesClientService.Listener clientListener, final String feature) {
@ -317,7 +317,7 @@ public class LicensesServiceTests extends AbstractLicensesIntegrationTests {
ClusterChangedEvent event = new ClusterChangedEvent("", clusterService().state(), clusterService().state());
licensesService.clusterChanged(event);
}
}, 0, 1, "should trigger onEnable once [trial license]");
}, 0, 1, "should trigger onEnable for " + feature + " once [trial license]");
}
private Action assertExpiryAction(String licenseType, TimeValue expiryDuration) {