test/jdk/sun/security/krb5/auto/Renewal.java
changeset 49884 03d263a61656
parent 48668 2da4a52715d8
equal deleted inserted replaced
49883:d7fe9d3e7bf3 49884:03d263a61656
   159         Date now = new Date();
   159         Date now = new Date();
   160         if (t == null && duration == -1) {
   160         if (t == null && duration == -1) {
   161             return;
   161             return;
   162         }
   162         }
   163         long change = (t.getTime() - System.currentTimeMillis()) / 1000;
   163         long change = (t.getTime() - System.currentTimeMillis()) / 1000;
   164         if (change > duration + 20 || change < duration - 20) {
   164         //accounting the delay factor in processing the instructions on host mc
   165             throw new Exception(t + " is not " + duration);
   165         if (change > duration + 40 || change < duration - 40) {
       
   166             throw new Exception("Timestamp is " + t + ", actual difference "
       
   167                     + change + " is not " + duration);
   166         }
   168         }
   167     }
   169     }
   168 }
   170 }