Skip to content

New exception message is confusing #210

Closed
@sravanr

Description

@sravanr

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions