use of org.apache.sling.commons.threads.impl.DefaultThreadPool in project sling by apache.
the class VotingHandlerTest method setUp.
@Before
public void setUp() throws Exception {
slingId1 = UUID.randomUUID().toString();
slingId2 = UUID.randomUUID().toString();
slingId3 = UUID.randomUUID().toString();
slingId4 = UUID.randomUUID().toString();
slingId5 = UUID.randomUUID().toString();
factory = new DummyResourceResolverFactory();
resetRepo();
config = new TestConfig("/var/discovery/impltesting/");
config.setHeartbeatInterval(999);
config.setHeartbeatTimeout(60);
votingHandler1 = VotingHandler.testConstructor(new DummySlingSettingsService(slingId1), factory, config);
votingHandler2 = VotingHandler.testConstructor(new DummySlingSettingsService(slingId2), factory, config);
votingHandler3 = VotingHandler.testConstructor(new DummySlingSettingsService(slingId3), factory, config);
votingHandler4 = VotingHandler.testConstructor(new DummySlingSettingsService(slingId4), factory, config);
votingHandler5 = VotingHandler.testConstructor(new DummySlingSettingsService(slingId5), factory, config);
resourceResolver = factory.getServiceResourceResolver(null);
ModifiableThreadPoolConfig tpConfig = new ModifiableThreadPoolConfig();
tpConfig.setMinPoolSize(80);
tpConfig.setMaxPoolSize(80);
threadPool = new DefaultThreadPool("testing", tpConfig);
}
Aggregations