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

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

                Author: ASF GitHub Bot
            Created on: 15/Jul/21 23:53
            Start Date: 15/Jul/21 23:53
    Worklog Time Spent: 10m 
      Work Description: y1chi commented on a change in pull request #15137:
URL: https://github.com/apache/beam/pull/15137#discussion_r670875356



##########
File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/coders/TimestampPrefixingWindowCoderTest.java
##########
@@ -107,15 +140,32 @@ public void testEncodeAndDecode() throws Exception {
         TimestampPrefixingWindowCoder.of(GlobalWindow.Coder.INSTANCE);
     CoderProperties.coderDecodeEncodeEqual(coder2, globalWindow);
 
-    List<CustomWindow> customWindowsToTest =
-        Lists.newArrayList(
-            new CustomWindow(new Instant(0L), new Instant(1L), true),
-            new CustomWindow(new Instant(100L), new Instant(200L), false),
-            new CustomWindow(new Instant(0L), 
BoundedWindow.TIMESTAMP_MAX_VALUE, true));
-    TimestampPrefixingWindowCoder<CustomWindow> coder3 =
-        TimestampPrefixingWindowCoder.of(CustomWindowCoder.of());
-    for (CustomWindow window : customWindowsToTest) {
-      CoderProperties.coderDecodeEncodeEqual(coder3, window);
+    for (CustomWindow window : CUSTOM_WINDOW_LIST) {
+      CoderProperties.coderDecodeEncodeEqual(TEST_CODER, window);
+    }
+  }
+
+  @Test
+  public void testConsistentWithEquals() {
+    assertThat(TEST_CODER.consistentWithEquals(), equalTo(true));
+  }
+
+  @Test
+  public void testIsRegisterByteSizeObserverCheap() {
+    assertThat(
+        TEST_CODER.isRegisterByteSizeObserverCheap(CUSTOM_WINDOW_LIST.get(0)), 
equalTo(true));
+  }
+
+  @Test
+  public void testGetEncodedElementByteSize() throws Exception {
+    TestElementByteSizeObserver observer = new TestElementByteSizeObserver();
+    for (CustomWindow value : CUSTOM_WINDOW_LIST) {
+      TEST_CODER.registerByteSizeObserver(value, observer);
+      observer.advance();
+      assertThat(
+          observer.getSumAndReset(),

Review comment:
       done.

##########
File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/coders/TimestampPrefixingWindowCoderTest.java
##########
@@ -107,15 +140,32 @@ public void testEncodeAndDecode() throws Exception {
         TimestampPrefixingWindowCoder.of(GlobalWindow.Coder.INSTANCE);
     CoderProperties.coderDecodeEncodeEqual(coder2, globalWindow);
 
-    List<CustomWindow> customWindowsToTest =
-        Lists.newArrayList(
-            new CustomWindow(new Instant(0L), new Instant(1L), true),
-            new CustomWindow(new Instant(100L), new Instant(200L), false),
-            new CustomWindow(new Instant(0L), 
BoundedWindow.TIMESTAMP_MAX_VALUE, true));
-    TimestampPrefixingWindowCoder<CustomWindow> coder3 =
-        TimestampPrefixingWindowCoder.of(CustomWindowCoder.of());
-    for (CustomWindow window : customWindowsToTest) {
-      CoderProperties.coderDecodeEncodeEqual(coder3, window);
+    for (CustomWindow window : CUSTOM_WINDOW_LIST) {
+      CoderProperties.coderDecodeEncodeEqual(TEST_CODER, window);
+    }
+  }
+
+  @Test
+  public void testConsistentWithEquals() {
+    assertThat(TEST_CODER.consistentWithEquals(), equalTo(true));

Review comment:
       done.




-- 
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: 623336)
    Time Spent: 14.5h  (was: 14h 20m)

> Fn API merging window support
> -----------------------------
>
>                 Key: BEAM-2914
>                 URL: https://issues.apache.org/jira/browse/BEAM-2914
>             Project: Beam
>          Issue Type: Improvement
>          Components: beam-model
>            Reporter: Henning Rohde
>            Priority: P3
>              Labels: portability
>          Time Spent: 14.5h
>  Remaining Estimate: 0h
>
> The Fn API should support merging windows. Detailed design TBD.
> Once design is ready, expand subtasks similarly to BEAM-2822.



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

Reply via email to