public static int getCloseTimeout(URL url) {
        String configuredCloseTimeout = System.getProperty(Constants.CLOSE_TIMEOUT_CONFIG_KEY);
        int defaultCloseTimeout = -1;
        if (StringUtils.isNotEmpty(configuredCloseTimeout)) {
            try {
                defaultCloseTimeout = Integer.parseInt(configuredCloseTimeout);
            } catch (NumberFormatException e) {
                // use default heartbeat
            }
        }
        if (defaultCloseTimeout < 0) {
            defaultCloseTimeout = getIdleTimeout(url);
        }
        int closeTimeout = url.getParameter(Constants.CLOSE_TIMEOUT_KEY, defaultCloseTimeout);
        int heartbeat = getHeartbeat(url);
        if (closeTimeout < heartbeat * 2) {
            throw new IllegalStateException("closeTimeout < heartbeatInterval * 2");
        }
        return closeTimeout;
    }
@Test
    void testConfiguredClose() {
        System.setProperty(Constants.CLOSE_TIMEOUT_CONFIG_KEY, "180000");
        URL url = URL.valueOf("dubbo://127.0.0.1:12345");
        Assertions.assertEquals(180000, UrlUtils.getCloseTimeout(url));
        System.clearProperty(Constants.HEARTBEAT_CONFIG_KEY);
    }