@Test(enabled=false)
    public void testGetFutureConfigBlocksUntilReady() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        MyPolicy policy = new MyPolicy(MutableMap.builder()
                .put(TestEntity.CONF_NAME, DependentConfiguration.whenDone(new Callable<String>() {
                        public String call() {
                            try {
                                latch.await(); return "aval";
                            } catch (InterruptedException e) {
                                throw Exceptions.propagate(e);
                            }
                        }}))
                .build());
        app.policies().add(policy);
        Thread t = new Thread(new Runnable() {
                public void run() {
                    try {
                        Thread.sleep(10+EARLY_RETURN_GRACE); latch.countDown();
                    } catch (InterruptedException e) {
                        throw Exceptions.propagate(e);
                    }
                }});
        try {
            long starttime = System.currentTimeMillis();
            t.start();
            assertEquals(policy.getConfig(TestEntity.CONF_NAME), "aval");
            long endtime = System.currentTimeMillis();
            assertTrue((endtime - starttime) >= 10, "starttime="+starttime+"; endtime="+endtime);
        } finally {
            t.interrupt();
        }
    }
@Test(enabled=false)
    public void testGetFutureConfigBlocksUntilReady() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        MyPolicy policy = new MyPolicy(MutableMap.builder()
                .put(TestEntity.CONF_NAME, DependentConfiguration.whenDone(new Callable<String>() {
                        public String call() {
                            try {
                                latch.await(); return "aval";
                            } catch (InterruptedException e) {
                                throw Exceptions.propagate(e);
                            }
                        }}))
                .build());
        app.policies().add(policy);
        Thread t = new Thread(new Runnable() {
                public void run() {
                    try {
                        Thread.sleep(10+EARLY_RETURN_GRACE); latch.countDown();
                    } catch (InterruptedException e) {
                        throw Exceptions.propagate(e);
                    }
                }});
        try {
            long starttime = System.currentTimeMillis();
            t.start();
            assertEquals(policy.getConfig(TestEntity.CONF_NAME), "aval");
            long endtime = System.currentTimeMillis();
            assertTrue((endtime - starttime) >= 10, "starttime="+starttime+"; endtime="+endtime);
        } finally {
            t.interrupt();
        }
    }
@test(enabled=false) public void testgetfutureconfigblocksuntilready() throws exception { final countdownlatch latch = new countdownlatch(1); mypolicy policy = new mypolicy(mutablemap.builder() .put(testentity.conf_name, dependentconfiguration.whendone(new callable<string>() { public string call() { try { latch.await(); return "aval"; } catch (interruptedexception e) { throw exceptions.propagate(e); } }})) .build()); app.policies().add(policy); thread t = new thread(new runnable() { public void run() { try { thread.sleep(10+early_return_grace); latch.countdown(); } catch (interruptedexception e) { throw exceptions.propagate(e); } }}); try { long starttime = system.currenttimemillis(); t.start(); assertequals(policy.getconfig(testentity.conf_name), "aval"); long endtime = system.currenttimemillis(); asserttrue((endtime - starttime) >= 10, "starttime="+starttime+"; endtime="+endtime); } finally { t.interrupt(); } }