Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MigrationManagerTest: fix Hibernate problem that prevented the test t…

…o run correctly
  • Loading branch information...
commit 3a511e65083fddba1ca440d52a91ed831fa97ab2 1 parent ef00aa9
Silvio Moioli authored April 24, 2014
5  java/code/src/com/redhat/rhn/manager/org/test/MigrationManagerTest.java
@@ -175,6 +175,11 @@ public void testRemoveMonitoringProbeSuites() throws Exception {
175 175
         assertEquals(5, MonitoringManager.getInstance().probesForSystem(origOrgAdmin,
176 176
                 server, null).size());
177 177
 
  178
+        // reload the server object, since its type is changed from Server to
  179
+        // MonitoredServer when we added the probes. MonitoringManager does not to that by
  180
+        // default, and this can cause Hibernate problems later
  181
+        server = (Server) HibernateFactory.reload(server);
  182
+
178 183
         MigrationManager.removeOrgRelationships(origOrgAdmin, server);
179 184
 
180 185
         // verify that the probes were removed from the system

0 notes on commit 3a511e6

Please sign in to comment.
Something went wrong with that request. Please try again.