forked from voldemort/voldemort
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a log instead of Voldemort exception in Histogram and added Req…
…uestCounterTest
- Loading branch information
Chinmay Soman
committed
Mar 21, 2012
1 parent
8b53cc0
commit fd33676
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package voldemort.store.stats; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class RequestCounterTest { | ||
|
||
private RequestCounter requestCounter; | ||
|
||
@Before | ||
public void setUp() { | ||
// Initialize the RequestCounter with a histogram | ||
requestCounter = new RequestCounter(10000, true); | ||
} | ||
|
||
@Test | ||
public void test() { | ||
long val = 234; | ||
requestCounter.addRequest(val); | ||
} | ||
|
||
@Test | ||
public void testLargeValues() { | ||
long val = 999999992342756424l; | ||
requestCounter.addRequest(val); | ||
} | ||
|
||
} |