Skip to content

Commit d4306a1

Browse files
committed
TIKA-4809: Collapse duplicate OOM/SystemExit tests in TikaServerIntegrationTest
1 parent 12cdd94 commit d4306a1

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

tika-server/tika-server-core/src/test/java/org/apache/tika/server/core/TikaServerIntegrationTest.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,6 @@ public void testOOM() throws Exception {
144144
testBaseline();
145145
}
146146

147-
@Test
148-
public void testOOMWithPipes() throws Exception {
149-
// With pipes-based parsing, OOM in a child process should NOT crash the server
150-
startProcess(new String[]{"-config", getConfig("tika-config-server-pipes-basic.json")});
151-
152-
awaitServerStartup();
153-
154-
Response response = WebClient
155-
.create(endPoint + RMETA_PATH)
156-
.accept("application/json")
157-
.put(ClassLoader.getSystemResourceAsStream(TEST_OOM));
158-
159-
// Server should return 503 (Service Unavailable) for OOM, not crash
160-
assertEquals(503, response.getStatus());
161-
assertErrorResponseStatus(response, "OOM");
162-
163-
// Server should still be running - verify with a successful request
164-
testBaseline();
165-
}
166-
167147
@Test
168148
public void testSystemExit() throws Exception {
169149
// With pipes-based parsing, System.exit in a child process should NOT crash the server
@@ -184,26 +164,6 @@ public void testSystemExit() throws Exception {
184164
testBaseline();
185165
}
186166

187-
@Test
188-
public void testSystemExitWithPipes() throws Exception {
189-
// With pipes-based parsing, System.exit in a child process should NOT crash the server
190-
startProcess(new String[]{"-config", getConfig("tika-config-server-pipes-basic.json")});
191-
192-
awaitServerStartup();
193-
194-
Response response = WebClient
195-
.create(endPoint + RMETA_PATH)
196-
.accept("application/json")
197-
.put(ClassLoader.getSystemResourceAsStream(TEST_SYSTEM_EXIT));
198-
199-
// UNSPECIFIED_CRASH is a transient process failure — 503, same category as OOM/TIMEOUT
200-
assertEquals(503, response.getStatus());
201-
assertErrorResponseStatus(response, "UNSPECIFIED_CRASH");
202-
203-
// Server should still be running - verify with a successful request
204-
testBaseline();
205-
}
206-
207167
@Test
208168
@Timeout(60000)
209169
public void testTimeout() throws Exception {

0 commit comments

Comments
 (0)