use of org.commonjava.indy.content.IndyPathGenerator in project indy by Commonjava.
the class PackageMetadataGeneratorTest method setup.
@Before
public void setup() throws Exception {
stores = new MemoryStoreDataManager(true);
core = new GalleyCoreBuilder(new FileCacheProviderFactory(temp.newFolder("cache"))).build();
final DefaultIndyConfiguration config = new DefaultIndyConfiguration();
config.setNotFoundCacheTimeoutSeconds(1);
final ExpiringMemoryNotFoundCache nfc = new ExpiringMemoryNotFoundCache(config);
WeftExecutorService rescanService = new PoolWeftExecutorService("test-rescan-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
final LocationExpander locations = new IndyLocationExpander(stores);
final PackageMetadataMerger merger = new PackageMetadataMerger();
final TypeMapper types = new StandardTypeMapper();
final DownloadManager downloads = new DefaultDownloadManager(stores, core.getTransferManager(), locations, null, nfc, rescanService);
WeftExecutorService contentAccessService = new PoolWeftExecutorService("test-content-access-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
DefaultDirectContentAccess contentAccess = new DefaultDirectContentAccess(downloads, contentAccessService);
final GroupMergeHelper helper = new GroupMergeHelper(downloads);
specialPathManager = new SpecialPathManagerImpl();
fileManager = new DefaultDownloadManager(stores, core.getTransferManager(), core.getLocationExpander(), rescanService);
generator = new PackageMetadataGenerator(contentAccess, stores, downloads, types, merger, helper, new MemoryNotFoundCache(), new IndyPathGenerator(Collections.singleton(new NPMStoragePathCalculator(specialPathManager))), new NPMStoragePathCalculator(specialPathManager));
}
use of org.commonjava.indy.content.IndyPathGenerator in project indy by Commonjava.
the class PackageMetadataMergerTest method setup.
@Before
public void setup() throws Exception {
cacheProvider = new FileCacheProvider(temp.newFolder("cache"), new IndyPathGenerator(Collections.singleton(new NPMStoragePathCalculator(new SpecialPathManagerImpl()))), new NoOpFileEventManager(), new TransferDecoratorManager(new NoOpTransferDecorator()), false);
mapper = new IndyObjectMapper(true);
mapper.registerModule(new PackageSerializerModule());
}
Aggregations