Skip to content

Commit

Permalink
[HWKMETRICS-153] fix texts and add some javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
John Sanda committed Jun 29, 2015
1 parent 4116876 commit 2af60ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import static org.junit.Assert.assertEquals
*/
class CountersITest extends RESTTest {

// @Test
@Test
void createSimpleCounter() {
String tenantId = nextTenantId()
String id = "C1"
Expand All @@ -46,7 +46,7 @@ class CountersITest extends RESTTest {
assertEquals(expectedData, response.data)
}

// @Test
@Test
void createCounterWithTagsAndDataRetention() {
String tenantId = nextTenantId()
String id = "C1"
Expand Down Expand Up @@ -74,7 +74,7 @@ class CountersITest extends RESTTest {
assertEquals(expectedData, response.data)
}

// @Test
@Test
void createAndFindCounters() {
String tenantId = nextTenantId()
String counter1 = "C1"
Expand Down Expand Up @@ -121,7 +121,7 @@ class CountersITest extends RESTTest {
assertEquals(expectedData, response.data)
}

// @Test
@Test
void addDataForMultipleCountersAndFindhWithDateRange() {
String tenantId = nextTenantId()
String counter1 = "C1"
Expand Down Expand Up @@ -160,15 +160,14 @@ class CountersITest extends RESTTest {
assertEquals(200, response.status)

def expectedData = [
[timestamp: start.plusMinutes(1).millis, value: 20],
[timestamp: start.millis, value: 10]
]
assertEquals(expectedData, response.data)

response = hawkularMetrics.get(
path: "counters/$counter2/data",
headers: [(tenantHeaderName): tenantId],
query: [start: start.millis, end: start.plusMinutes(1).millis]
query: [start: start.millis, end: start.plusMinutes(2).millis]
)
assertEquals(200, response.status)

Expand All @@ -179,7 +178,7 @@ class CountersITest extends RESTTest {
assertEquals(expectedData, response.data)
}

// @Test
@Test
void addDataForSingleCounterAndFindWithDefaultDateRange() {
String tenantId = nextTenantId()
String counter = "C1"
Expand Down Expand Up @@ -210,7 +209,7 @@ class CountersITest extends RESTTest {
assertEquals(expectedData, response.data)
}

// @Test
@Test
void findWhenThereIsNoData() {
String tenantId = nextTenantId()
String counter1 = "C1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,13 @@ public interface TaskService {
*/
Observable<Task> scheduleTask(DateTime time, Task task);

/**
* The scheduler does not execute tasks. Instead when a task is ready for execution the scheduler emits an event
* where the event is the task to be executed. The observer can then execute the task.
*
* @param taskType The type of task for which you want to observe tasks
* @param onNext The action that will be called when a a task is ready for execution
* @return The {@link Subscription Rx subscription}
*/
Subscription subscribe(TaskType taskType, Action1<? super Task> onNext);
}

0 comments on commit 2af60ed

Please sign in to comment.