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