You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2020/06/10 19:05:11 UTC
[celix] 03/03: Revert "Adds a timestamp to the celix bundle cache
for the PubSubSerializationProviderTestSuite"
This is an automated email from the ASF dual-hosted git repository.
pnoltes pushed a commit to branch feature/pubsub_utils_test_fix
in repository https://gitbox.apache.org/repos/asf/celix.git
commit e313dd1cc3333a2f205ca82fafa7da03c92da393
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Wed Jun 10 21:03:39 2020 +0200
Revert "Adds a timestamp to the celix bundle cache for the PubSubSerializationProviderTestSuite"
This reverts commit c7e75f869a6cbcbef9f414b2de52910526d5d2c7.
---
.../gtest/src/PubSubSerializationProviderTestSuite.cc | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/bundles/pubsub/pubsub_utils/gtest/src/PubSubSerializationProviderTestSuite.cc b/bundles/pubsub/pubsub_utils/gtest/src/PubSubSerializationProviderTestSuite.cc
index 0604f51..2522bbf 100644
--- a/bundles/pubsub/pubsub_utils/gtest/src/PubSubSerializationProviderTestSuite.cc
+++ b/bundles/pubsub/pubsub_utils/gtest/src/PubSubSerializationProviderTestSuite.cc
@@ -20,7 +20,6 @@
#include "gtest/gtest.h"
#include <memory>
-#include <chrono>
#include <celix_api.h>
#include "pubsub_serialization_provider.h"
@@ -29,15 +28,7 @@ class PubSubSerializationProviderTestSuite : public ::testing::Test {
public:
PubSubSerializationProviderTestSuite() {
auto* props = celix_properties_create();
-
- //NOTE setting the cache using a timestamp. This test suite fails from time to time on CI.
- //Cannot reproduce this on host, so testing if a timestamp improves stability.
- const auto t = std::chrono::system_clock::now();
- char *cache = nullptr;
- asprintf(&cache, ".pubsub_serialization_provider_cache-%li", t.time_since_epoch().count());
- celix_properties_set(props, OSGI_FRAMEWORK_FRAMEWORK_STORAGE, cache);
- free(cache);
-
+ celix_properties_set(props, OSGI_FRAMEWORK_FRAMEWORK_STORAGE, ".pubsub_serialization_provider_cache");
auto* fwPtr = celix_frameworkFactory_createFramework(props);
auto* ctxPtr = celix_framework_getFrameworkContext(fwPtr);
fw = std::shared_ptr<celix_framework_t>{fwPtr, [](auto* f) {celix_frameworkFactory_destroyFramework(f);}};