Skip to content

Commit

Permalink
Adding sleep so that the very short tests don't crash when finalizing…
Browse files Browse the repository at this point in the history
… during the startup of the proc_read thread
  • Loading branch information
khuck committed Apr 4, 2023
1 parent bbba923 commit 38d6770
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/unit_tests/C++/apex_init.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "apex_api.hpp"
#include <unistd.h>

int main (int argc, char** argv) {
APEX_UNUSED(argc);
APEX_UNUSED(argv);
apex::init("apex::init unit test", 0, 1);
apex::apex_options::use_screen_output(true);
sleep(1);
apex::finalize();
apex::cleanup();
return 0;
Expand Down
2 changes: 2 additions & 0 deletions src/unit_tests/C++/apex_init_args.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "apex_api.hpp"
#include <unistd.h>

int main (int argc, char** argv) {
APEX_UNUSED(argc);
APEX_UNUSED(argv);
apex::init("apex::init unit test", 0, 1);
apex::apex_options::use_screen_output(true);
sleep(1);
apex::finalize();
apex::cleanup();
return 0;
Expand Down
1 change: 1 addition & 0 deletions src/unit_tests/C/apex_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
int main (int argc, char** argv) {
apex_init("apex_init unit test", 0, 1);
apex_set_use_screen_output(1);
sleep(1);
apex_finalize();
apex_cleanup();
return 0;
Expand Down
1 change: 1 addition & 0 deletions src/unit_tests/C/apex_init_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
int main (int argc, char** argv) {
apex_init("apex_init_args unit test", 0, 1);
apex_set_use_screen_output(1);
sleep(1);
apex_finalize();
apex_cleanup();
return 0;
Expand Down

0 comments on commit 38d6770

Please sign in to comment.