Skip to content

Commit 94dd8ec

Browse files
committed
Fix unit test
1 parent 77b8919 commit 94dd8ec

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Coordination/ZooKeeperDataReader.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ int64_t deserializeStorageData(Storage & storage, ReadBuffer & in, LoggerPtr log
137137
storage.container.insertOrReplace(path, node);
138138

139139
if (ephemeral_owner != 0)
140+
{
140141
storage.committed_ephemerals[ephemeral_owner].insert(path);
142+
++storage.committed_ephemeral_nodes;
143+
}
141144

142145
storage.acl_map.addUsage(node.acl_id);
143146
}

src/Coordination/tests/gtest_coordination_common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ void addNode(Storage & storage, const std::string & path, const std::string & da
113113
using Node = typename Storage::Node;
114114
Node node{};
115115
node.setData(data);
116-
node.stats.setEphemeralOwner(ephemeral_owner);
116+
if (ephemeral_owner)
117+
node.stats.setEphemeralOwner(ephemeral_owner);
117118
storage.container.insertOrReplace(path, node);
118119
auto child_it = storage.container.find(path);
119120
auto child_path = DB::getBaseNodeName(child_it->key);

0 commit comments

Comments
 (0)