Remove the try/catch from urgent_replication.py
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Apr 2016 02:59:21 +0000 (14:59 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 6 Jun 2016 14:36:23 +0000 (16:36 +0200)
This meant that for ages, the duplicate OID was unnoticed, and when the syntax
was corrected recently, this caused the test to run, and so cause trouble

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz
source4/dsdb/tests/python/urgent_replication.py

index 46aa55807a5bc118f9ba9e65b85ad6a91dbaa9b9..ec2f6d13c2ba7bb3dc3515b41e1f7bbfb1113f31 100755 (executable)
@@ -147,9 +147,8 @@ systemFlags: 33554432""", ["relax:0"])
     def test_attributeSchema_object(self):
         """Test if the urgent replication is activated when handling an attributeSchema object"""
 
-        try:
-            self.ldb.add_ldif(
-                              """dn: CN=test attributeSchema,cn=Schema,CN=Configuration,%s""" % self.base_dn + """
+        self.ldb.add_ldif(
+            """dn: CN=test attributeSchema,cn=Schema,CN=Configuration,%s""" % self.base_dn + """
 objectClass: attributeSchema
 cn: test attributeSchema
 instanceType: 4
@@ -165,12 +164,9 @@ searchFlags: 8
 lDAPDisplayName: testAttributeSchema
 name: test attributeSchema""")
 
-            # urgent replication should be enabled when creating
-            res = self.ldb.load_partition_usn("cn=Schema,cn=Configuration," + self.base_dn)
-            self.assertEquals(res["uSNHighest"], res["uSNUrgent"])
-
-        except LdbError:
-            print "Not testing urgent replication when creating attributeSchema object ...\n"
+        # urgent replication should be enabled when creating
+        res = self.ldb.load_partition_usn("cn=Schema,cn=Configuration," + self.base_dn)
+        self.assertEquals(res["uSNHighest"], res["uSNUrgent"])
 
         # urgent replication should be enabled when modifying
         m = Message()