149150151152153154155156157158159
} private boolean canWrite(FedoraClient client, String pid, String logMessage) throws Exception { FedoraAPIMMTOM apim = client.getAPIMMTOM(); try { apim.modifyObject(pid, null, null, null, logMessage); return true; } catch (Exception e) { e.printStackTrace(); return false; }
300301302303304305306307308309310
for (int i = 0; i < numTimes; i++) { try { if (apim == null) { apim = client.getAPIMMTOM(); } apim.modifyObject(TEST_PID, null, null, null, "i=" + i); } catch (Exception e) { failCount++; } } LOGGER.info("Failed {} times", failCount);