Skip to content

Commit cd4e6f8

Browse files
committed
fix #112, apply same fix as we did for #51, but on b2_0 branch
1 parent ae41837 commit cd4e6f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/com/marklogic/client/test/ConditionalDocumentTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class ConditionalDocumentTest {
4646
@BeforeClass
4747
public static void beforeClass()
4848
throws FailedRequestException, ForbiddenUserException, ResourceNotFoundException, ResourceNotResendableException {
49+
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "debug");
4950
Common.connectAdmin();
5051
serverConfig = Common.client.newServerConfigManager();
5152
serverConfig.readConfiguration();
@@ -97,7 +98,7 @@ public void testConditional() throws SAXException, IOException,
9798
assertTrue("Write with bad version succeeded", ex != null);
9899
assertTrue("Write with bad version had wrong error", statusCode == 412);
99100
assertTrue("Write with no version had misleading message",
100-
ex.getMessage().contains("Local message: Content version must match to write document. Server Message: RESTAPI-CONTENTWRONGVERSION: (err:FOER0000) Content version mismatch: uri: /test/conditional1.xml"));
101+
ex.getMessage().contains("Local message: Content version must match to write document. Server Message: RESTAPI-CONTENTWRONGVERSION: (err:FOER0000) Content version mismatch: uri /test/conditional1.xml doesn't match if-match: 11111"));
101102

102103

103104
desc.setVersion(DocumentDescriptor.UNKNOWN_VERSION);
@@ -148,7 +149,7 @@ public void testConditional() throws SAXException, IOException,
148149
assertTrue("Overwrite with bad version succeeded", ex != null);
149150
assertTrue("Write with bad version had wrong error", statusCode == 412);
150151
assertTrue("Write with no version had misleading message",
151-
ex.getMessage().contains("Local message: Content version must match to write document. Server Message: RESTAPI-CONTENTWRONGVERSION: (err:FOER0000) Content version mismatch: uri: /test/conditional1.xml version:"));
152+
ex.getMessage().contains("Local message: Content version must match to write document. Server Message: RESTAPI-CONTENTWRONGVERSION: (err:FOER0000) Content version mismatch: uri /test/conditional1.xml has current version"));
152153

153154
desc.setVersion(goodVersion);
154155
docMgr.write(desc, contentHandle);

0 commit comments

Comments
 (0)