PEL: Make elog_update_ts_test more CI friendly
This testcase was intermittently failing in Jenkins with an error
that implied it could not write the log serialization file.
Since all event logs serialize to the same directory, it's possible
other instances of this testcase, or elog_errorwrap_test, were running
at the same time and caused collisions. To try to fix that, make the
following changes:
* Make the elog ID, and hence the filename, be random
* If there is a save file by that ID already, get a new ID.
* Don't delete the save directory at the end, only the file, in case
another test is still using it.
* Also don't delete the save directory at the end of
elog_errorwrap_test, in case another jenkins job is running this at
the same time.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib81015936d0cc673b330f49f1c703e8fa16853ae
diff --git a/test/elog_errorwrap_test.hpp b/test/elog_errorwrap_test.hpp
index 537a7ff..154dee5 100644
--- a/test/elog_errorwrap_test.hpp
+++ b/test/elog_errorwrap_test.hpp
@@ -90,7 +90,8 @@
~TestLogManager()
{
- fs::remove_all(ERRLOG_PERSIST_PATH);
+ // Leave the directory as other testcases use it and they
+ // may be running in parallel from other jobs.
}
};