private void assertUntil(Runnable f, long time, TimeUnit unit) {
        long until = System.currentTimeMillis() + unit.toMillis(time);
        while (true) {
            try {
                f.run();
                return;
            } catch (AssertionError e) {
                if (until < System.currentTimeMillis()) {
                    throw e;
                }
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e1) {
                    Thread.currentThread().interrupt();
                }
            }
        }
    }
Consul Registry Acl Tests

@author <a href=mailto:wangyx1122@gmail.com>kunple-w</a>
registry/registry-consul/src/test/java/com/alipay/sofa/rpc/registry/consul/ConsulRegistryAclTest.java