[tor-commits] [metrics-lib/master] Test that we accept any bandwidth history interval.

karsten at torproject.org karsten at torproject.org
Mon Dec 22 12:28:17 UTC 2014


commit 305b72d0d7a126c50dfcacb8054fa7b8e91e2ec0
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Mon Dec 22 13:25:12 2014 +0100

    Test that we accept any bandwidth history interval.
    
    The bandwidth history interval may soon change from 900 seconds to
    something else.  Make sure that this doesn't break the parser.  Related
    to #13838 and 13988.
---
 .../descriptor/impl/ExtraInfoDescriptorImplTest.java           |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java b/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
index e194923..a92a4a7 100644
--- a/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
+++ b/test/org/torproject/descriptor/impl/ExtraInfoDescriptorImplTest.java
@@ -855,6 +855,14 @@ public class ExtraInfoDescriptorImplTest {
         + "4707695616,4699666432,4650004480,4489718784");
   }
 
+  @Test()
+  public void testReadHistoryNonStandardInterval()
+      throws DescriptorParseException {
+    DescriptorBuilder.createWithReadHistoryLine("read-history "
+        + "2012-02-11 09:03:39 (1800 s) "
+        + "4707695616,4699666432,4650004480,4489718784");
+  }
+
   @Test(expected = DescriptorParseException.class)
   public void testDirreqWriteHistoryMissingBytesBegin()
       throws DescriptorParseException {



More information about the tor-commits mailing list