joerghoh commented on a change in pull request #485:
URL: https://github.com/apache/jackrabbit-oak/pull/485#discussion_r804790962



##########
File path: 
oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/delegate/SessionDelegateTest.java
##########
@@ -68,4 +74,38 @@ public void testRefreshUnaware() {
         delegate.refresh(false);
         verify(pp, times(6)).refresh();
     }
+    
+    @Test(expected = RepositoryException.class)

Review comment:
       The contract states just a ```RepositoryException```, so it makes sense 
just to test for that.
   Although one could argue, that a change in that code, which also throws a 
```RepositoryException``` (or an exception inheriting from it) would be caught 
as well.
   
   As this is the test for this implementation,I will change it to the 
```ConstraintViolationException```.

##########
File path: 
oak-lucene/src/test/java/org/apache/jackrabbit/oak/composite/blueGreen/IndexUtils.java
##########
@@ -142,7 +142,7 @@ public static void checkLibsIsReadOnly(Persistence p) 
throws RepositoryException
         try {
             libsNode.addNode("illegal");
             Assert.fail();
-        } catch (UnsupportedOperationException e) {
+        } catch (RepositoryException e) {

Review comment:
       Won't change it here. This test is not responsible to test the 
implementation of the JCR, so it should just rely on the API contract.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to