Hi
I noticed lately some folks complaining about a unit test failure,
namely PhonebookManagerTestIntegration failing with some replication
error (we're talking about 4.6 here). It was strange enough since for
some people (me included) the test passed just fine, running single or
in suite.
However, I noticed the test failing on my backup computer (while on my
main computer it passed). Doing a little debug I was able to find a fix
for it.
I have also applied the patch on my main computer (just to be sure I
didn't break anything) and the test passed.
If you are among the ones that got this failure, I have attached the
patch. When you have time, try it, and if it works for you, let me know
so I can commit it.
TBH I am a bit puzzled about why the test fails on some machines and it
works on others - I have a hunch regarding the order of the tests but I
haven't investigated.
Cheers,
Cristi
>From 488bb25972f34a2216829f86e161680ea08f0904 Mon Sep 17 00:00:00 2001
From: Cristi Starasciuc <[email protected]>
Date: Tue, 7 Jun 2011 15:26:13 +0200
Subject: [PATCH] PhonebookManager integration test fix
---
.../phonebook/PhonebookManagerTestIntegration.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/phonebook/PhonebookManagerTestIntegration.java b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/phonebook/PhonebookManagerTestIntegration.java
index cf41103..52ba203 100644
--- a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/phonebook/PhonebookManagerTestIntegration.java
+++ b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/phonebook/PhonebookManagerTestIntegration.java
@@ -126,6 +126,11 @@ public class PhonebookManagerTestIntegration extends IntegrationTestCase {
public void testUpdateOnGroupDelete() throws Exception {
loadDataSet("phonebook/PhonebookMembersAndConsumersSeed.db.xml");
+ loadDataSetXml("domain/DomainSeed.xml");
+ User user1002 = m_coreContext.loadUser(1002);
+ user1002.setPermissionManager(m_permissionManager);
+ User yellowthroat = m_coreContext.loadUser(1001);
+ yellowthroat.setPermissionManager(m_permissionManager);
Group g = m_coreContext.getGroupByName("warblers", false);
assertNotNull(g);
m_settingDao.deleteGroups(Collections.singleton(g.getId()));
--
1.7.4.4
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev/