Search in sources :

Example 1 with GlobalLoader

use of com.couchbase.client.core.config.loader.GlobalLoader in project couchbase-jvm-clients by couchbase.

the class GlobalBucketRefresherIntegrationTest method loadGlobalConfig.

/**
 * Not related, but to test the refresh we first need to load the global config and prime the config provider.
 */
private void loadGlobalConfig(final ConfigurationProvider provider) {
    TestNodeConfig config = config().firstNodeWith(Services.KV).get();
    GlobalLoader loader = new GlobalLoader(core);
    ProposedGlobalConfigContext globalConfigContext = loader.load(new NodeIdentifier(config.hostname(), config.ports().get(Services.MANAGER)), config.ports().get(Services.KV)).block();
    provider.proposeGlobalConfig(globalConfigContext);
}
Also used : GlobalLoader(com.couchbase.client.core.config.loader.GlobalLoader) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) ProposedGlobalConfigContext(com.couchbase.client.core.config.ProposedGlobalConfigContext) NodeIdentifier(com.couchbase.client.core.node.NodeIdentifier)

Aggregations

ProposedGlobalConfigContext (com.couchbase.client.core.config.ProposedGlobalConfigContext)1 GlobalLoader (com.couchbase.client.core.config.loader.GlobalLoader)1 NodeIdentifier (com.couchbase.client.core.node.NodeIdentifier)1 TestNodeConfig (com.couchbase.client.test.TestNodeConfig)1