Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
[BZ 1108095] Use topologyDelta instead of hard requestLimit for tests
Browse files Browse the repository at this point in the history
(cherry picked from commit c6b482c)
  • Loading branch information
Michael Burman committed Sep 26, 2014
1 parent c69cbbd commit 3233bd4
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -70,20 +70,20 @@ public void setupClass() throws Exception {
metricsServer.setConfiguration(configuration);
metricsServer.setDAO(dao);
metricsServer.setDateTimeService(dateTimeService);
requestLimit = storageSession.getRequestLimit();
requestLimit = storageSession.getTopologyDelta();

metricsServer.init();
}

private void resetRateLimits() {
storageSession.setRequestLimit(requestLimit);
storageSession.setTopologyDelta(requestLimit);
}

@Test
public void insertRawData() throws Exception {
Random random = new Random();
DateTime currentHour = hour(3);
storageSession.setRequestLimit(10000);
storageSession.setTopologyDelta(NUM_SCHEDULES);
dateTimeService.setNow(currentHour);
Set<MeasurementDataNumeric> data = new HashSet<MeasurementDataNumeric>();
for (int i = 0; i < NUM_SCHEDULES; ++i) {
Expand Down

0 comments on commit 3233bd4

Please sign in to comment.