marklogic / java-client-api

Java client for the MarkLogic enterprise NoSQL database
https://docs.marklogic.com/guide/java
Apache License 2.0
58 stars 72 forks source link

test suite failures due to lack of xdmp:get-server-field privilege #778

Closed tdiepenbrock closed 4 years ago

tdiepenbrock commented 7 years ago

Running the test suite from the develop branch yields 5 failures/132 errors. Many of these errors are due to the request user not having the xdmp:get-server-field privilege. Log is attached.

Tests were run in the following environment:

ML version: 9.0-1.1 OS: MacOS.
Java version: 1.8.0_102-b14.
Client API: develop branch at https://github.com/marklogic/java-client-api/commit/bdbfa6d2eff495000ac4b45b5b9385efabc4291c.
Maven: Apache Maven 3.5.0

This was a brand new installation of everything except Java: I had freshly installed Maven for the first time, ML was a bare install of 9.0-1.1, and I had newly cloned the develop branch. I ran mvn test-compile, followed by mvn exec:java@test-server-init, followed by mvn test..

When I gave the rest-writer role the xdmp:get-server-field privilege, most of the errors went away and I was left with errors that Sam Mefford was also getting, plus five semantics-related errors.

java-client-api-develop-failures.txt

georgeajit commented 7 years ago

@sammefford

Why should rest-writer be assigned a xdmp:get-server-field? Isn't that a bug, then? Or is this issue missing parts of user setup / other configurations?

grechaw commented 7 years ago

looks like a regression/bug to me. accessing the rest error format should be amped. I'm surprised this is surfacing the Java tests and not trunk REST tests though. Can you confirm that this is just 5.0-SNAPSHOT failures?

rest-writer should not have any privileges beyond the rest-writer and rest-reader privileges.

grechaw commented 7 years ago

There are a lot of errors in REST API unit tests today. Looking into it.

grechaw commented 7 years ago

I see some notices that the nightly build was failing on mac and window last night. Maybe this issue will be resolved underneath.

sammefford commented 7 years ago

@tdiepenbrock can you confirm that you didn't get any error when you ran mvn exec:java@test-server-init? And you didn't change Common.java? In other words, were you connecting to localhost port 8012? And was the server left as normal with Digest auth?

sammefford commented 7 years ago

I ask because I don't know how to duplicate this. When I follow the same steps I don't see the same errors

sammefford commented 7 years ago

Sorry, let me acknowledge that I haven't yet tried to fully duplicate your env. I'd just be very surprised if this is env related . . . plus I don't have easy access to MacOS.