More passing HTTP IStorageServer tests.

This commit is contained in:
Itamar Turner-Trauring 2022-02-10 17:07:21 -05:00
parent 7466ee25a8
commit abf3048ab3
2 changed files with 8 additions and 4 deletions

View File

@ -58,7 +58,7 @@ from twisted.plugin import (
from eliot import (
log_call,
)
from foolscap.api import eventually
from foolscap.api import eventually, RemoteException
from foolscap.reconnector import (
ReconnectionInfo,
)
@ -77,6 +77,7 @@ from allmydata.util.hashutil import permute_server_hash
from allmydata.util.dictutil import BytesKeyDict, UnicodeKeyDict
from allmydata.storage.http_client import (
StorageClient, StorageClientImmutables, StorageClientGeneral,
ClientException as HTTPClientException,
)
@ -1037,8 +1038,13 @@ class _FakeRemoteReference(object):
"""
local_object = attr.ib(type=object)
@defer.inlineCallbacks
def callRemote(self, action, *args, **kwargs):
return getattr(self.local_object, action)(*args, **kwargs)
try:
result = yield getattr(self.local_object, action)(*args, **kwargs)
return result
except HTTPClientException as e:
raise RemoteException(e.args)
@attr.s

View File

@ -1162,8 +1162,6 @@ class HTTPImmutableAPIsTests(
"test_advise_corrupt_share",
"test_bucket_advise_corrupt_share",
"test_disconnection",
"test_matching_overlapping_writes",
"test_non_matching_overlapping_writes",
}