package com.lambdaworks.redis.protocol;

import com.lambdaworks.redis.event.DefaultEventPublisherOptions;
import com.lambdaworks.redis.event.EventBus;
import com.lambdaworks.redis.event.EventPublisherOptions;
import com.lambdaworks.redis.metrics.CommandLatencyCollector;
import com.lambdaworks.redis.resource.ClientResources;
import com.lambdaworks.redis.resource.EventLoopGroupProvider;
import io.netty.util.concurrent.*;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

/**
 * @author Mark Paluch
 */
public class EmptyClientResources implements ClientResources {

    public static final DefaultEventPublisherOptions PUBLISHER_OPTIONS = DefaultEventPublisherOptions.disabled();
    public static final EmptyClientResources INSTANCE = new EmptyClientResources();

    @Override
    public Future<Boolean> shutdown() {
        return new SucceededFuture<>(GlobalEventExecutor.INSTANCE, true);
    }

    @Override
    public Future<Boolean> shutdown(long quietPeriod, long timeout, TimeUnit timeUnit) {
        return new SucceededFuture<>(GlobalEventExecutor.INSTANCE, true);
    }

    @Override
    public EventLoopGroupProvider eventLoopGroupProvider() {
        return null;
    }

    @Override
    public EventExecutorGroup eventExecutorGroup() {
        return null;
    }

    @Override
    public int ioThreadPoolSize() {
        return 0;
    }

    @Override
    public int computationThreadPoolSize() {
        return 0;
    }

    @Override
    public EventBus eventBus() {
        return null;
    }

    @Override
    public EventPublisherOptions commandLatencyPublisherOptions() {
        return PUBLISHER_OPTIONS;
    }

    @Override
    public CommandLatencyCollector commandLatencyCollector() {
        return null;
    }
}

@@ -319,16 +319,67 @@
 ources;%0A
+import com.lambdaworks.redis.resource.DnsResolver;%0A
 import c
@@ -472,55 +472,8 @@
 *;%0A%0A
-import java.util.concurrent.CompletableFuture;%0A
 impo
@@ -1778,11 +1778,92 @@
 l;%0A    %7D
+%0A%0A    @Override%0A    public DnsResolver dnsResolver() %7B%0A        return null;%0A    %7D
 %0A%7D%0A

Add DNS Resolver override in JMH tests