[tor-commits] [metrics-lib/master] Fix unit tests.

karsten at torproject.org karsten at torproject.org
Sat May 19 09:43:37 UTC 2012


commit 26083ebde4421711641b2f01fe6436f24314144e
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Sat May 19 11:42:21 2012 +0200

    Fix unit tests.
    
    - Annotation lines starting with @ are now recognized.
    - Unrecognized keywords in "w" lines are now ignored.
---
 .../impl/RelayNetworkStatusConsensusImplTest.java  |    4 ++--
 .../impl/RelayNetworkStatusVoteImplTest.java       |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
index b26f474..e5a20e3 100644
--- a/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
+++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusConsensusImplTest.java
@@ -331,7 +331,7 @@ public class RelayNetworkStatusConsensusImplTest {
         "network-status-version 3\n ");
   }
 
-  @Test(expected = DescriptorParseException.class)
+  @Test()
   public void testNetworkStatusVersionPrefixLineAtChar()
       throws DescriptorParseException {
     ConsensusBuilder.createWithNetworkStatusVersionLine(
@@ -926,7 +926,7 @@ public class RelayNetworkStatusConsensusImplTest {
     StatusEntryBuilder.createWithWLine("w ");
   }
 
-  @Test(expected = DescriptorParseException.class)
+  @Test()
   public void testWLineWarpSeven() throws DescriptorParseException {
     StatusEntryBuilder.createWithWLine("w Warp=7");
   }
diff --git a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
index 7569d7a..7fbdb7d 100644
--- a/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
+++ b/test/org/torproject/descriptor/impl/RelayNetworkStatusVoteImplTest.java
@@ -503,7 +503,7 @@ public class RelayNetworkStatusVoteImplTest {
         "network-status-version 3\n ");
   }
 
-  @Test(expected = DescriptorParseException.class)
+  @Test()
   public void testNetworkStatusVersionPrefixLineAtChar()
       throws DescriptorParseException {
     VoteBuilder.createWithNetworkStatusVersionLine(



More information about the tor-commits mailing list