From 67781aa336f8864d2daf8540282e3a08e02a314b Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Thu, 27 Mar 2008 10:05:53 +0000
Subject: [PATCH] Fix snmp trap test and enable it.

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPTrapManagerTest.java |   18 +++++-------------
 1 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPTrapManagerTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPTrapManagerTest.java
index 63d5eaa..39c827d 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPTrapManagerTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/snmp/SNMPTrapManagerTest.java
@@ -45,16 +45,9 @@
 import org.testng.annotations.Test;
 
 /**
- * The class is a simple example showing how to use the SNMP Manager API.
- *
- * <p>When calling the program, you must specify:
- * <br>     - host: hostname of the SNMP agent you want to query.
- * <br>     - port: port number to use.
- *
- * <p>As a reminder, if you wish to query the SNMP agent example provided
- *    as part of Java DMK, use port 8085.
+ * SNMP trap test.
  */
-@Test(enabled=false, groups = {"precommit", "snmp"}, sequential = true)
+@Test(enabled=true, groups = {"precommit", "snmp"}, sequential = true)
 public class SNMPTrapManagerTest extends SNMPConnectionManager {
 
     @BeforeClass
@@ -63,7 +56,7 @@
         super.setUp();
     }
     
-    @Test(enabled = false)
+    @Test(enabled = true)
     public void checkTraps() {
         try {
             
@@ -97,12 +90,11 @@
             trapThread.start();
             
             // One Trap
-            this.setDown(
-                 "On demand from org.opends.server.snmp.SNMPTrapManagerTest");
+            this.setDown();
             
             int trapNumbers = trapListener.getNumberV1Traps();
             
-            // Should received 3 traps
+            // Should received 1 traps
             assertEquals(trapNumbers, 1);
             
             // Nicely stop the SnmpEventReportDispatcher.

--
Gitblit v1.10.0