File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function cleanup_lola() {
1212 # Ensure tests are run in a clean state
1313 rm -rf /dev/shm/lola-* 6432*
1414 rm -rf /tmp/mw_com_lola/* /* 6432*
15+ rm -rf /tmp/lola-ctl-* 6432* _lock
1516}
1617
1718function create_service_manifest() {
Original file line number Diff line number Diff line change @@ -82,12 +82,23 @@ class ProxyWithRealMemFixture : public ::testing::Test
8282 shm_files_.push_back (std::move (shm_file));
8383 }
8484
85+ void Cleanup () {
86+ score::filesystem::IStandardFilesystem::instance ().Remove (" /dev/shm/lola-ctl-0000000000052719-00016" );
87+ score::filesystem::IStandardFilesystem::instance ().Remove (" /dev/shm/lola-data-0000000000052719-00016" );
88+ score::filesystem::IStandardFilesystem::instance ().Remove (" /tmp/lola-ctl-0000000000052719-00016_lock" );
89+ score::filesystem::IStandardFilesystem::instance ().Remove (kTmpPath );
90+ score::filesystem::IStandardFilesystem::instance ().Remove (kServiceInstanceUsageMarkerFile );
91+ }
92+
8593 void SetUp () override
8694 {
8795 EXPECT_CALL (runtime_mock_.mock_ , GetBindingRuntime (BindingType::kLoLa ))
8896 .WillRepeatedly (::testing::Return (&lola_runtime_mock_));
8997 ON_CALL (lola_runtime_mock_, GetRollbackSynchronization ())
9098 .WillByDefault (::testing::ReturnRef (rollback_synchronization_));
99+
100+ // Ensure we start with a clean state
101+ Cleanup ();
91102 }
92103
93104 void TearDown () override
@@ -97,6 +108,9 @@ class ProxyWithRealMemFixture : public ::testing::Test
97108 score::filesystem::IStandardFilesystem::instance ().Remove (std::string{" /dev/shm" } + file);
98109 }
99110 shm_files_.clear ();
111+
112+ // Ensure we leave with a clean state
113+ Cleanup ();
100114 }
101115
102116 ProxyWithRealMemFixture& WithAMockedServiceDiscovery ()
You can’t perform that action at this time.
0 commit comments