Skip to content

Commit 10ebf1b

Browse files
remove getSystemStats liveness probe from test bootstrap
The probe broke CI after SystemGetSystemStats became admin-only: freshly-minted tenants from newtenant.php aren't admins, so the probe returned status:error and every @before threw "server is not available". A successful newtenant.php response already proves working credentials. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a20eac1 commit 10ebf1b

2 files changed

Lines changed: 8 additions & 22 deletions

File tree

src/test/java/org/databunker/DatabunkerproApiPciTest.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,10 @@ public static void setUpBeforeClass() throws IOException {
4141
if (data != null && "ok".equals(data.get("status"))) {
4242
tenantName = (String) data.get("tenantname");
4343
apiToken = (String) data.get("xtoken");
44-
45-
// Test connection with new credentials
46-
try (DatabunkerproApi testApi = new DatabunkerproApi(API_URL, apiToken, tenantName)) {
47-
Map<String, Object> result = testApi.getSystemStats(null);
48-
serverAvailable = result != null && "ok".equals(result.get("status"));
49-
if (serverAvailable) {
50-
System.out.println("\nSuccessfully connected to DatabunkerPro server");
51-
System.out.println("Tenant: " + tenantName);
52-
System.out.println("API URL: " + API_URL);
53-
}
54-
}
44+
serverAvailable = true;
45+
System.out.println("\nSuccessfully connected to DatabunkerPro server");
46+
System.out.println("Tenant: " + tenantName);
47+
System.out.println("API URL: " + API_URL);
5548
}
5649
}
5750
} catch (Exception e) {

src/test/java/org/databunker/DatabunkerproApiTest.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,10 @@ public static void setUpBeforeClass() throws IOException {
4343
if (data != null && "ok".equals(data.get("status"))) {
4444
tenantName = (String) data.get("tenantname");
4545
apiToken = (String) data.get("xtoken");
46-
47-
// Test connection with new credentials
48-
try (DatabunkerproApi testApi = new DatabunkerproApi(API_URL, apiToken, tenantName)) {
49-
Map<String, Object> result = testApi.getSystemStats(null);
50-
serverAvailable = result != null && "ok".equals(result.get("status"));
51-
if (serverAvailable) {
52-
System.out.println("\nSuccessfully connected to DatabunkerPro server");
53-
System.out.println("Tenant: " + tenantName);
54-
System.out.println("API URL: " + API_URL);
55-
}
56-
}
46+
serverAvailable = true;
47+
System.out.println("\nSuccessfully connected to DatabunkerPro server");
48+
System.out.println("Tenant: " + tenantName);
49+
System.out.println("API URL: " + API_URL);
5750
}
5851
}
5952
} catch (Exception e) {

0 commit comments

Comments
 (0)