File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
opengrok-indexer/src/test/java/org/opengrok/indexer/index Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 43
43
import org .junit .jupiter .api .BeforeAll ;
44
44
import org .junit .jupiter .api .BeforeEach ;
45
45
import org .junit .jupiter .api .Test ;
46
+ import org .junit .jupiter .api .condition .EnabledOnOs ;
47
+ import org .junit .jupiter .api .condition .OS ;
46
48
import org .junit .jupiter .api .io .TempDir ;
47
49
import org .opengrok .indexer .configuration .Configuration ;
48
50
import org .opengrok .indexer .configuration .RuntimeEnvironment ;
@@ -152,10 +154,15 @@ void testEmptyDir(@TempDir Path tempDir) throws Exception {
152
154
153
155
/**
154
156
* Check that {@link IOException} thrown during index check is treated as success.
157
+ * Runs only on Unix systems because the {@link IOException} is not thrown on Windows
158
+ * for non-existent directories.
155
159
*/
156
160
@ Test
161
+ @ EnabledOnOs ({OS .LINUX , OS .MAC })
157
162
void testIndexCheckIOException () {
163
+ // This is set to simulate IOException in IndexCheck.checkDir().
158
164
configuration .setDataRoot ("/nonexistent" );
165
+
159
166
configuration .setProjectsEnabled (false );
160
167
161
168
IndexCheck .IndexCheckMode mode = IndexCheck .IndexCheckMode .VERSION ;
You can’t perform that action at this time.
0 commit comments