[ 
https://issues.apache.org/jira/browse/BEAM-13019?focusedWorklogId=668510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-668510
 ]

ASF GitHub Bot logged work on BEAM-13019:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/21 16:10
            Start Date: 21/Oct/21 16:10
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #15685:
URL: https://github.com/apache/beam/pull/15685#discussion_r733833118



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/testing/PAssert.java
##########
@@ -698,11 +715,16 @@ public PCollectionContentsAssert(
      * <p>Returns this {@code IterableAssert}.
      */
     @SafeVarargs
-    final PCollectionContentsAssert<T> containsInAnyOrder(
+    @Override
+    public final PCollectionContentsAssert<T> containsInAnyOrder(
         SerializableMatcher<? super T>... elementMatchers) {
       return 
satisfies(SerializableMatchers.containsInAnyOrder(elementMatchers));
     }
 
+    @Override public PCollectionContentsAssert<T> containsInAnyOrder() {
+      return empty();
+    }

Review comment:
       ```suggestion
       @Override
       public PCollectionContentsAssert<T> containsInAnyOrder() {
         return empty();
       }
   ```

##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/testing/PAssert.java
##########
@@ -299,6 +299,23 @@ public int hashCode() {
      */
     IterableAssert<T> containsInAnyOrder(T... expectedElements);
 
+    /**
+     * Asserts that the iterable in question matches the provided elements.
+     *
+     * @return the same {@link IterableAssert} builder for further assertions
+     */
+    IterableAssert<T> containsInAnyOrder(SerializableMatcher<? super T>... 
expectedElements);
+
+    /**
+     * Asserts that the iterable in question is empty.
+     *
+     * @deprecated Prefer {@link #empty()} to this method.
+     *
+     * @return the same {@link IterableAssert} builder for further assertions

Review comment:
       ```suggestion
        * @return the same {@link IterableAssert} builder for further assertions
        * @deprecated Prefer {@link #empty()} to this method.
   ```




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 668510)
    Time Spent: 2h  (was: 1h 50m)

> PAssert.PCollectionContentsAssert contains unusable assertion methods
> ---------------------------------------------------------------------
>
>                 Key: BEAM-13019
>                 URL: https://issues.apache.org/jira/browse/BEAM-13019
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>    Affects Versions: 2.32.0
>            Reporter: Chris Gray
>            Assignee: Chris Gray
>            Priority: P3
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> The method
> {code:java}
>  final PCollectionContentsAssert<T> containsInAnyOrder( SerializableMatcher<? 
> super T>... elementMatchers){code}
> is in PAssert.PCollectionContentsAssert but is not usable since it is not in 
> the IterableAssert interface.  It would be a useful method to have access to.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to