spec/infinispan_expiry_spec.js
function waitIdleTimeExpire(key, timeout) {
  return function(client) {
    var contains = true;
    t.sleepFor(200); // sleep required
    waitsFor(function() {
      client.containsKey(key).then(function(success) {
        contains = success;
      });

      return !contains;
    }, '`' + key + '` key should be expired', timeout);

    return client;
  }
}
function waitIdleTimeExpire(key, timeout) {
  return function(client) {
    var contains = true;
    t.sleepFor(200); // sleep required
    waitsFor(function() {
      client.containsKey(key).then(function(success) {
        contains = success;
      });

      return !contains;
    }, '`' + key + '` key should be expired', timeout);

    return client;
  }
}
function waitIdleTimeExpire ( key , timeout ) { return function ( client ) { var contains = true ; t . sleepFor ( 200 ) ; // sleep required waitsFor ( function ( ) { client . containsKey ( key ) . then ( function ( success ) { contains = success ; } ) ; return ! contains ; } , '`' + key + '` key should be expired' , timeout ) ; return client ; } }
timeout in ms
timeout in ms