mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 09:18:28 +00:00
refactor(storage-api): remove namespace lock from StorageAPI (#3365)
* refactor(storage-api): remove namespace lock from StorageAPI * test(scanner): wait for runtime budget cancellation --------- Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -12,7 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use rustfs_ecstore::{disk::DiskStore, error::Error, store::ECStore};
|
||||
use rustfs_ecstore::{
|
||||
disk::DiskStore,
|
||||
error::Error,
|
||||
store::ECStore,
|
||||
store_api::{NamespaceLocking, StorageAPI},
|
||||
};
|
||||
use rustfs_storage_api::StorageAdminApi;
|
||||
|
||||
fn storage_admin_api_type_name<T>() -> &'static str
|
||||
@@ -27,7 +32,19 @@ where
|
||||
std::any::type_name::<T>()
|
||||
}
|
||||
|
||||
fn storage_api_with_namespace_locking_type_name<T>() -> &'static str
|
||||
where
|
||||
T: StorageAPI + NamespaceLocking,
|
||||
{
|
||||
std::any::type_name::<T>()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ecstore_implements_storage_admin_api_contract() {
|
||||
assert!(storage_admin_api_type_name::<ECStore>().ends_with("::ECStore"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ecstore_implements_storage_api_and_namespace_locking_contracts() {
|
||||
assert!(storage_api_with_namespace_locking_type_name::<ECStore>().ends_with("::ECStore"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user