SystemHandlerTest was failing in our environment and, AFAIU, it expects that the underlying database will always return 1 as the id of a persisted test object. This is normally not the case, as the value is taken from a sequence and there is no code to ensure it is reset before the test, so I simply relaxed that condition accordingly.
See attached patch. Regards, -- Silvio Moioli SUSE LINUX Products GmbH Maxfeldstraße 5, 90409 Nürnberg Germany
>From ec1b4e81c7e82005293bb50623aa6bef8bdcc92c Mon Sep 17 00:00:00 2001 From: Silvio Moioli <smoi...@suse.de> Date: Wed, 11 Sep 2013 15:00:56 +0200 Subject: [PATCH 20/22] SystemHandlerTest: do not rely on hardcoded sequence ids --- .../com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java index 2bdf677..e885711 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/test/SystemHandlerTest.java @@ -1858,7 +1858,7 @@ public class SystemHandlerTest extends BaseHandlerTestCase { Long returnInt = handler.scheduleReboot(adminKey, new Integer(testServer.getId().intValue()), new Date()); - assertEquals(returnInt, new Integer(1)); + assertNotNull(returnInt); dr = ActionManager.recentlyScheduledActions(admin, null, 30); assertEquals(1, dr.size() - preScheduleSize); -- 1.8.1.4
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel