public Promise<Void> gracefullyShutdownClientChannels() {
        return gracefullyShutdownClientChannels(ShutdownType.SHUTDOWN);
    }
@Test
    void connectionNeedsToBeForceClosedAndOneChannelThrowsAnException() throws Exception {
        String configName = "server.outofservice.close.timeout";
        AbstractConfiguration configuration = ConfigurationManager.getConfigInstance();

        try {
            configuration.setProperty(configName, "0");
            createChannels(5);
            ChannelFuture connect = new Bootstrap()
                    .group(CLIENT_EVENT_LOOP)
                    .channel(LocalChannel.class)
                    .handler(new ChannelInitializer<>() {
                        @Override
                        protected void initChannel(Channel ch) {
                            ch.pipeline().addLast(new ChannelOutboundHandlerAdapter() {
                                @Override
                                public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception {
                                    throw new Exception();
                                }
                            });
                        }
                    })
                    .remoteAddress(LOCAL_ADDRESS)
                    .connect()
                    .sync();
            channels.add(connect.channel());

            boolean await = shutdown.gracefullyShutdownClientChannels().await(10, TimeUnit.SECONDS);
            assertTrue(await, "the promise should finish even if a channel failed to close");
            assertEquals(1, channels.size(), "all other channels should have been closed");
        } finally {
            configuration.setProperty(configName, "30");
        }
    }