mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-04-04 15:35:18 +00:00
add snapshot test
This commit is contained in:
parent
d646c31b1d
commit
9b6097f75d
@ -16,12 +16,11 @@ class SnapshotTask(TestFramework):
|
||||
"auto_sync_enabled": True,
|
||||
"max_sequential_workers": 3,
|
||||
"max_random_workers": 3,
|
||||
"neighbors_only": True,
|
||||
}
|
||||
}
|
||||
|
||||
def run_test(self):
|
||||
# Stop the last node to verify historical file sync
|
||||
|
||||
# Submit and upload files on node 0
|
||||
data_root_1 = self.__upload_file__(0, 256 * 1024)
|
||||
wait_until(lambda: self.nodes[1].zgs_get_file_info(data_root_1) is not None)
|
||||
@ -34,10 +33,9 @@ class SnapshotTask(TestFramework):
|
||||
self.start_storage_node(1)
|
||||
self.nodes[1].wait_for_rpc_connection()
|
||||
|
||||
# Submit and upload files on node 0
|
||||
data_root_1 = self.__upload_file__(1, 256 * 1024)
|
||||
wait_until(lambda: self.nodes[0].zgs_get_file_info(data_root_1) is not None)
|
||||
wait_until(lambda: self.nodes[0].zgs_get_file_info(data_root_1)["finalized"])
|
||||
wait_until(lambda: self.nodes[1].zgs_get_file_info(data_root_1) is not None)
|
||||
wait_until(lambda: self.nodes[1].zgs_get_file_info(data_root_1)["finalized"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
SnapshotTask().main()
|
||||
|
Loading…
Reference in New Issue
Block a user