use of com.facebook.buck.rules.TargetGraphAndBuildTargets in project buck by facebook.
the class VersionedTargetGraphCacheTest method testHit.
@Test
public void testHit() throws Exception {
VersionedTargetGraphCache cache = new VersionedTargetGraphCache();
TargetGraphAndBuildTargets graph = createSimpleGraph();
VersionedTargetGraphCacheResult firstResult = cache.getVersionedTargetGraph(BUS, graph, ImmutableMap.of(), POOL);
assertEmpty(firstResult);
VersionedTargetGraphCacheResult secondResult = cache.getVersionedTargetGraph(BUS, graph, ImmutableMap.of(), POOL);
assertHit(secondResult, firstResult.getTargetGraphAndBuildTargets());
}
use of com.facebook.buck.rules.TargetGraphAndBuildTargets in project buck by facebook.
the class VersionedTargetGraphCacheTest method testPoolChangeCausesHit.
@Test
public void testPoolChangeCausesHit() throws Exception {
VersionedTargetGraphCache cache = new VersionedTargetGraphCache();
TargetGraphAndBuildTargets graph = createSimpleGraph();
VersionedTargetGraphCacheResult firstResult = cache.getVersionedTargetGraph(BUS, graph, ImmutableMap.of(), POOL);
assertEmpty(firstResult);
VersionedTargetGraphCacheResult secondResult = cache.getVersionedTargetGraph(BUS, graph, ImmutableMap.of(), new ForkJoinPool(2));
assertHit(secondResult, firstResult.getTargetGraphAndBuildTargets());
}
Aggregations