use of org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingService in project scheduling by ow2-proactive.
the class RunningTaskRecoveryWithRecoveredNodeTestBase method startDedicatedScheduler.
@Before
public void startDedicatedScheduler() throws Exception {
RMFactory.setOsJavaProperty();
schedulerHelper = new SchedulerTHelper(false, new File(getSchedulerStartConfigurationURL().toURI()).getAbsolutePath(), new File(RM_CONFIGURATION_START.toURI()).getAbsolutePath(), null);
logForwardingService = new LogForwardingService(SocketBasedForwardingProvider.class.getName());
logForwardingService.initialize();
}
use of org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingService in project scheduling by ow2-proactive.
the class TestListenJobLogs method init.
@Before
public void init() throws Exception {
logForwardingService = new LogForwardingService(SocketBasedForwardingProvider.class.getName());
logForwardingService.initialize();
}
use of org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingService in project scheduling by ow2-proactive.
the class TestLoggers method logBasedOnProActive.
@Test
public void logBasedOnProActive() throws Throwable {
LogForwardingService lfsPA = new LogForwardingService("org.ow2.proactive.scheduler.common.util.logforwarder.providers.ProActiveBasedForwardingProvider");
lfsPA.initialize();
JobId id1 = schedulerHelper.submitJob(new File(jobDescriptor.toURI()).getAbsolutePath());
final AppenderTester test1 = new AppenderTester();
lfsPA.addAppender(Log4JTaskLogs.JOB_LOGGER_PREFIX + id1, test1);
schedulerHelper.getSchedulerInterface().listenJobLogs(id1, lfsPA.getAppenderProvider());
schedulerHelper.waitForEventJobFinished(id1);
await().until(logEventsReceived(test1));
lfsPA.terminate();
}
use of org.ow2.proactive.scheduler.common.util.logforwarder.LogForwardingService in project scheduling by ow2-proactive.
the class TestLoggers method logBasedOnSocket.
@Test
public void logBasedOnSocket() throws Throwable {
LogForwardingService lfsSocket = new LogForwardingService("org.ow2.proactive.scheduler.common.util.logforwarder.providers.SocketBasedForwardingProvider");
lfsSocket.initialize();
JobId id2 = schedulerHelper.submitJob(new File(jobDescriptor.toURI()).getAbsolutePath());
AppenderTester test2 = new AppenderTester();
lfsSocket.addAppender(Log4JTaskLogs.JOB_LOGGER_PREFIX + id2, test2);
schedulerHelper.getSchedulerInterface().listenJobLogs(id2, lfsSocket.getAppenderProvider());
schedulerHelper.waitForEventJobFinished(id2);
await().until(logEventsReceived(test2));
lfsSocket.terminate();
}
Aggregations