Search in sources :

Example 1 with TaskQueue

use of com.wavefront.agent.queueing.TaskQueue in project java by wavefrontHQ.

the class ReportSourceTagHandlerTest method setup.

@Before
public void setup() {
    mockAgentAPI = EasyMock.createMock(SourceTagAPI.class);
    taskQueueFactory = new TaskQueueFactory() {

        @Override
        public <T extends DataSubmissionTask<T>> TaskQueue<T> getTaskQueue(@Nonnull HandlerKey handlerKey, int threadNum) {
            return null;
        }
    };
    newAgentId = UUID.randomUUID();
    senderTaskFactory = new SenderTaskFactoryImpl(new APIContainer(null, mockAgentAPI, null), newAgentId, taskQueueFactory, null, new DefaultEntityPropertiesFactoryForTesting());
    handlerKey = HandlerKey.of(ReportableEntityType.SOURCE_TAG, "4878");
    sourceTagHandler = new ReportSourceTagHandlerImpl(handlerKey, 10, senderTaskFactory.createSenderTasks(handlerKey), null, blockedLogger);
}
Also used : APIContainer(com.wavefront.agent.api.APIContainer) TaskQueueFactory(com.wavefront.agent.queueing.TaskQueueFactory) SourceTagAPI(com.wavefront.api.SourceTagAPI) TaskQueue(com.wavefront.agent.queueing.TaskQueue) DefaultEntityPropertiesFactoryForTesting(com.wavefront.agent.data.DefaultEntityPropertiesFactoryForTesting) Before(org.junit.Before)

Aggregations

APIContainer (com.wavefront.agent.api.APIContainer)1 DefaultEntityPropertiesFactoryForTesting (com.wavefront.agent.data.DefaultEntityPropertiesFactoryForTesting)1 TaskQueue (com.wavefront.agent.queueing.TaskQueue)1 TaskQueueFactory (com.wavefront.agent.queueing.TaskQueueFactory)1 SourceTagAPI (com.wavefront.api.SourceTagAPI)1 Before (org.junit.Before)1