Closed
Description
Regression test TestCRUDModulesDb is failing in nightly regression
public void testXQueryModuleCRUDXmlFileNegative() {
DatabaseClient client = DatabaseClientFactory.newClient("localhost", 8011, "rest-admin", "x", Authentication.DIGEST);
// get a manager
ExtensionLibrariesManager libsMgr = client.newServerConfigManager().newExtensionLibrariesManager();
String Path = "/foo/my/path/to/my/module.xqy";
FileHandle f = new FileHandle(new File("src/test/java/com/marklogic/javaclient/data/all_well.xml")).withFormat(Format.XML);
// write XQuery file to the modules database
try{
libsMgr.write(Path, f);
}catch(ResourceNotFoundException e){
assertEquals("Negative test Passed as","Local message: Could not write resource at /foo/my/path/to/my/module.xqy. Server Message: /v1/foo/my/path/to/my/module.xqy" , e.getMessage());
}
// delete it
try{
libsMgr.delete(Path);
}catch(Exception e){
assertEquals("", "Local message: Could not delete resource at /foo/my/path/to/my/module.xqy. Server Message: /v1/foo/my/path/to/my/module.xqy", e.getMessage());
}
}
Actual:
Local message: Could not write resource at /foo/my/path/to/my/module.xqy. Server Message: Request failed. Error body not received from server