jdk/test/java/rmi/testlibrary/ActivationLibrary.java
changeset 22085 752c27397429
parent 13256 5886d7607acd
child 23025 ee5c4f07f86c
equal deleted inserted replaced
22084:fd3c6345eaef 22085:752c27397429
    64     public static void deactivate(Remote remote,
    64     public static void deactivate(Remote remote,
    65                                   ActivationID id) {
    65                                   ActivationID id) {
    66         // We do as much as 50 deactivation trials, each separated by
    66         // We do as much as 50 deactivation trials, each separated by
    67         // at least 100 milliseconds sleep time (max sleep time of 5 secs).
    67         // at least 100 milliseconds sleep time (max sleep time of 5 secs).
    68         final long deactivateSleepTime = 100;
    68         final long deactivateSleepTime = 100;
    69         for (int i = 0; i < 50; i ++) {
    69         long stopTime = System.currentTimeMillis() + deactivateSleepTime * 50;
       
    70         while (System.currentTimeMillis() < stopTime) {
    70             try {
    71             try {
    71                 if (Activatable.inactive(id) == true) {
    72                 if (Activatable.inactive(id) == true) {
    72                     mesg("inactive successful");
    73                     mesg("inactive successful");
    73                     return;
    74                     return;
    74                 } else {
    75                 } else {