Skip to content

Commit 018e7cf

Browse files
committed
reduce delay used in parallel test, as it appears to cause a failure.
TODO: rework the test to not be timing-sensitive
1 parent 458b775 commit 018e7cf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/cpp/schema_specific/stepfile_rw_progress.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525

2626
#include "SdaiAUTOMOTIVE_DESIGN.h"
2727

28-
//macro for 50 ms sleep (could be more for a larger file, may need reduced for a fast processor)
28+
//macro for N ms sleep
29+
//currently used for 5ms sleep (could be more for a larger file, may need reduced for a fast processor)
30+
//TODO: rework this test to not be timing-sensitive
2931
#ifdef HAVE_STD_CHRONO
30-
# define DELAY(t) std::this_thread::sleep_for(std::chrono::milliseconds(50));
32+
# define DELAY(t) std::this_thread::sleep_for(std::chrono::milliseconds(t));
3133
#else
3234
# ifndef __WIN32__
3335
# define DELAY(t) usleep( t * 100 )
@@ -45,7 +47,7 @@ void readProgressParallel( STEPfile & f, float & maxProgress ) {
4547
if( p > maxProgress ) {
4648
maxProgress = p;
4749
}
48-
DELAY( 50 );
50+
DELAY( 5 );
4951
}
5052
}
5153

@@ -55,7 +57,7 @@ void writeProgressParallel( STEPfile & f, float & maxProgress ) {
5557
if( p > maxProgress ) {
5658
maxProgress = p;
5759
}
58-
DELAY( 50 );
60+
DELAY( 5 );
5961
}
6062
}
6163

0 commit comments

Comments
 (0)