Skip to content
Snippets Groups Projects
Commit fdcc997a authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix tests

parent 9bd5b01f
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,10 @@ import (
"net/url"
)
const max_encoded_source_size = 63
const max_encoded_stream_size = 100
const max_encoded_group_size = 50
func shouldEscape(c byte, db bool) bool {
if c == '$' || c == ' ' || c == '%' {
return true
......
......@@ -74,10 +74,6 @@ const stream_filter_all = "all"
const stream_filter_finished = "finished"
const stream_filter_unfinished = "unfinished"
const max_encoded_source_size = 63
const max_encoded_stream_size = 100
const max_encoded_group_size = 50
var dbSessionLock sync.Mutex
type SizeRecord struct {
......
......@@ -115,12 +115,15 @@ std::string MongoDBClient::DBAddress(const std::string& address) const {
void MongoDBClient::CleanUp() {
if (write_concern_) {
mongoc_write_concern_destroy(write_concern_);
write_concern_ = nullptr;
}
if (current_collection_) {
mongoc_collection_destroy(current_collection_);
current_collection_ = nullptr;
}
if (client_) {
mongoc_client_destroy(client_);
client_ = nullptr;
}
}
......@@ -205,9 +208,6 @@ Error MongoDBClient::Insert(const std::string& collection, const MessageMeta& fi
}
MongoDBClient::~MongoDBClient() {
if (!connected_) {
return;
}
CleanUp();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment