Examples of test_CheckIfDocAdded()


Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfDocAdded()

      doc.put(DocumentPojo.queryRelevance_, 105);
      doc.put(DocumentPojo.score_, 110);
      docs.add(doc);
      rp.setData(docs, (BasePojoApiMap<BasicDBObject>)null);
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("3.1", docs);
      // (don't clear from cache, next doc should return without making a request)
     
      // 3.2] Like 3.1 but with JsonPath
      // (clear cache here to ensure we don't just used the cached doc)
      queryEngine.test_cacheClear(true, true, fakeEndpoint.parentSource.getKey());
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfDocAdded()

      doc.put(DocumentPojo.queryRelevance_, 105);
      doc.put(DocumentPojo.score_, 110);
      docs.add(doc);
      rp.setData(docs, (BasePojoApiMap<BasicDBObject>)null);
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("3.1", docs);
      // (don't clear from cache, next doc should return without making a request)
     
      // 4.1] Test cached query
      docs.remove(0);
      queryId = new ObjectId();
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfDocAdded()

      docs.remove(0);
      queryId = new ObjectId();
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.1", false); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.1", docs);
      // (don't clear from cache, next doc should check cache but remove expired value)
     
      // 4.2] Test expired then cached query
      // (currently need to clear the doc cache to make this work - see tests that need to be added properly, listed above)
      queryEngine.test_cacheClear(false, true, fakeEndpoint.parentSource.getKey());
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfDocAdded()

      docs.remove(0);
      queryId = new ObjectId();
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.2", true); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.2", docs);
      // (don't clear from cache, next doc should return without making a request)
     
      // 4.3] Test cached query - bulk remove
      // (currently need to clear the doc cache to make this work - see tests that need to be added properly, listed above)
      queryEngine.test_cacheClear(false, true, fakeEndpoint.parentSource.getKey());
View Full Code Here

Examples of com.ikanow.infinit.e.api.knowledge.federated.SimpleFederatedQueryEngine.test_CheckIfDocAdded()

      queryId = new ObjectId();
      queryEngine.test_cacheFill("4.3a", true, true);
      queryEngine.preQueryActivities(queryId, query, communityIdStrs);
      queryEngine.test_CheckIfQueryLaunched("4.3", false); // (ie check no query added - because it was in the cache)
      queryEngine.postQueryActivities(queryId, docs, rp);
      queryEngine.test_CheckIfDocAdded("4.3", docs);
      queryEngine.test_cacheFill("4.3b", false, false);
      queryEngine.test_queryClear(true);   
    }
    finally {
      System.out.println("All tests run, quitting in 5s.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.