Class HealthPinger

  • public class HealthPinger
    extends Object
    The HealthPinger allows to "ping" individual services with real operations for their health. This can be used by up the stack code to assert the given state of a connected cluster and/or bucket.
    Michael Nitschinger
    • Constructor Detail

      • HealthPinger

        public HealthPinger()
    • Method Detail

      • ping

        public static rx.Single<PingReport> ping​(CoreEnvironment env,
                                                 String bucket,
                                                 String password,
                                                 ClusterFacade core,
                                                 String id,
                                                 long timeout,
                                                 TimeUnit timeUnit,
                                                 ServiceType... types)
        Performs a service ping against all or (if given) the services provided. First, all the services are contacted with: - KV - NOOP - N1QL - GET /admin/ping (expect 200 OK) - CBFT - GET /api/ping (expect 200 OK) - Views - GET / (expect 200 OK) - Analytics - POST /query/service with data {"statement": select 1;"} (expect 200 OK) Afterwards, the responses are assembled into a PingReport and returned.
        env - the environment to use.
        bucket - the bucket name
        password - the password of the bucket
        core - the core instance against to check.
        id - the id of the ping to use, can be null.
        timeout - the timeout for each individual and total ping report.
        timeUnit - the time unit for the timeout value.
        types - if present, limits the queried services for the given types.