use of org.commonjava.indy.mem.data.MemoryStoreDataManager in project indy by Commonjava.
the class DownloadManagerTest method setupTest.
@Before
public void setupTest() throws Exception {
data = new MemoryStoreDataManager(true);
WeftExecutorService rescanService = new PoolWeftExecutorService("test-rescan-executor", (ThreadPoolExecutor) Executors.newCachedThreadPool(), 2, 10f, false, null, null);
downloader = new DefaultDownloadManager(data, fixture.getTransferManager(), new IndyLocationExpander(data), null, new NoOpNotFoundCache(), rescanService);
}
use of org.commonjava.indy.mem.data.MemoryStoreDataManager in project indy by Commonjava.
the class ImpliedRepositoryDetectorTest method setup.
@Before
public void setup() throws Throwable {
fixture = new GalleyMavenFixture(temp);
fixture.initGalley();
fixture.withEnabledTransports(new HttpClientTransport(new HttpImpl(new MemoryPasswordManager())));
fixture.before();
storeManager = new MemoryStoreDataManager(true);
metadataManager = new ImpliedRepoMetadataManager(new IndyObjectMapper(true));
final ImpliedRepoConfig config = new ImpliedRepoConfig();
config.setEnabled(true);
config.addEnabledGroupNamePattern(".*");
File rootDir = temp.newFolder("indy.root");
final DataFileManager dataFiles = new DataFileManager(rootDir, new DataFileEventManager());
validator = new ArtifactStoreValidator(fixture.getTransferManager());
final IndyObjectMapper mapper = new IndyObjectMapper(Collections.emptySet());
ScriptEngine engine = new ScriptEngine(dataFiles);
detector = new TestImpliedRepositoryDetector(fixture.getPomReader(), storeManager, metadataManager, validator, engine, config, mapper);
summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup");
RemoteRepository remote = new RemoteRepository("test", "http://www.foo.com/repo");
Group group = new Group("group", remote.getKey());
storeManager.storeArtifactStore(remote, summary, false, true, new EventMetadata());
storeManager.storeArtifactStore(group, summary, false, true, new EventMetadata());
server.expect("HEAD", server.formatUrl("/repo/"), 200, "");
}
use of org.commonjava.indy.mem.data.MemoryStoreDataManager in project indy by Commonjava.
the class ImpliedRepoMaintainerTest method setup.
@Before
public void setup() {
storeDataManager = new MemoryStoreDataManager(true);
metadataManager = new ImpliedRepoMetadataManager(new IndyObjectMapper(true));
final ImpliedRepoConfig config = new ImpliedRepoConfig();
config.setEnabled(true);
maintainer = new ImpliedRepoMaintainer(storeDataManager, metadataManager, config);
summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup");
}
Aggregations