Remove another test use of get_rref
This commit is contained in:
parent
e745dbfb66
commit
d32d020b05
|
@ -437,7 +437,7 @@ class NativeStorageServer(service.MultiService):
|
|||
# attribute may change over time as connections are lost and
|
||||
# re-established. The _StorageServer should always be able to get the
|
||||
# most up-to-date value.
|
||||
return _StorageServer(get_rref=lambda: self._rref)
|
||||
return _StorageServer(get_rref=self.get_rref)
|
||||
|
||||
def _lost(self):
|
||||
log.msg(format="lost connection to %(name)s", name=self.get_name(),
|
||||
|
|
|
@ -2511,9 +2511,9 @@ class Connections(SystemTestMixin, unittest.TestCase):
|
|||
self.failUnlessEqual(len(nonclients), 1)
|
||||
|
||||
self.s1 = nonclients[0] # s1 is the server, not c0
|
||||
self.s1_rref = self.s1.get_rref()
|
||||
self.failIfEqual(self.s1_rref, None)
|
||||
self.failUnless(self.s1.is_connected())
|
||||
self.s1_storage_server = self.s1.get_storage_server()
|
||||
self.assertIsNot(self.s1_storage_server, None)
|
||||
self.assertTrue(self.s1.is_connected())
|
||||
d.addCallback(_start)
|
||||
|
||||
# now shut down the server
|
||||
|
@ -2524,9 +2524,9 @@ class Connections(SystemTestMixin, unittest.TestCase):
|
|||
d.addCallback(lambda ign: self.poll(_poll))
|
||||
|
||||
def _down(ign):
|
||||
self.failIf(self.s1.is_connected())
|
||||
rref = self.s1.get_rref()
|
||||
self.failUnless(rref)
|
||||
self.failUnlessIdentical(rref, self.s1_rref)
|
||||
self.assertFalse(self.s1.is_connected())
|
||||
storage_server = self.s1.get_storage_server()
|
||||
self.assertIsNot(storage_server, None)
|
||||
self.assertEqual(storage_server, self.s1_storage_server)
|
||||
d.addCallback(_down)
|
||||
return d
|
||||
|
|
Loading…
Reference in New Issue