[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/release] Fix and extend test for #26919 logging patch.
commit 7172978cde0c8de518c17537352c7e202d0fdb6d
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu Aug 2 21:21:45 2018 +0200
Fix and extend test for #26919 logging patch.
---
.../torproject/onionoo/server/PerformanceMetricsTest.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/torproject/onionoo/server/PerformanceMetricsTest.java b/src/test/java/org/torproject/onionoo/server/PerformanceMetricsTest.java
index 80328e5..e3d60ef 100644
--- a/src/test/java/org/torproject/onionoo/server/PerformanceMetricsTest.java
+++ b/src/test/java/org/torproject/onionoo/server/PerformanceMetricsTest.java
@@ -85,13 +85,23 @@ public class PerformanceMetricsTest {
}
@Test
- public void testMostFrequentStringAbcd() {
+ public void testMostFrequentStringAbbbbccddddeee() {
MostFrequentString mfs = new MostFrequentString();
mfs.addString("A");
mfs.addString("B");
+ mfs.addString("B");
+ mfs.addString("B");
+ mfs.addString("B");
+ mfs.addString("C");
mfs.addString("C");
mfs.addString("D");
- assertEquals("A (1), B (1), C (1)", mfs.toString());
+ mfs.addString("D");
+ mfs.addString("D");
+ mfs.addString("D");
+ mfs.addString("E");
+ mfs.addString("E");
+ mfs.addString("E");
+ assertEquals("B (4), D (4), E (3), A, C", mfs.toString());
}
@Test
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits