mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
fix test
This commit is contained in:
parent
0e86976e2b
commit
2a356715da
@ -112,7 +112,18 @@ UInt32 DataPartStorageOnDisk::getRefCount(const String & file_name) const
|
||||
static UInt64 calculateTotalSizeOnDiskImpl(const DiskPtr & disk, const String & from)
|
||||
{
|
||||
if (disk->isFile(from))
|
||||
return disk->getFileSize(from);
|
||||
{
|
||||
try
|
||||
{
|
||||
return disk->getFileSize(from);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
/// Files of detached part may be not exist, and then set file size is 0.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> files;
|
||||
disk->listFiles(from, files);
|
||||
UInt64 res = 0;
|
||||
|
@ -379,7 +379,7 @@ def test_system_detached_parts(drop_detached_parts_table):
|
||||
)
|
||||
|
||||
res = q(
|
||||
"select * from system.detached_parts where table like 'sdp_%' order by table, name"
|
||||
"select system.detached_parts.* except `path`, disk from system.detached_parts where table like 'sdp_%' order by table, name"
|
||||
)
|
||||
assert (
|
||||
res == "default\tsdp_0\tall\tall_1_1_0\tdefault\t\t1\t1\t0\n"
|
||||
|
Loading…
Reference in New Issue
Block a user