You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2022/11/13 05:28:49 UTC

[skywalking-banyandb] branch flaky-test created (now c4536f8)

This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a change to branch flaky-test
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git


      at c4536f8  Correct time line of arbitrary block testing

This branch includes the following new commits:

     new c4536f8  Correct time line of arbitrary block testing

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-banyandb] 01/01: Correct time line of arbitrary block testing

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hanahmily pushed a commit to branch flaky-test
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git

commit c4536f8febf9ee511c0cef8f30322c92ec543597
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Sun Nov 13 05:19:03 2022 +0000

    Correct time line of arbitrary block testing
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 banyand/tsdb/shard_test.go | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/banyand/tsdb/shard_test.go b/banyand/tsdb/shard_test.go
index acfb72d..8d59607 100644
--- a/banyand/tsdb/shard_test.go
+++ b/banyand/tsdb/shard_test.go
@@ -549,6 +549,7 @@ var _ = Describe("Shard", func() {
 				3,
 			)
 			Expect(err).NotTo(HaveOccurred())
+			started("BlockID-19700101-01-1", "SegID-19700101-1", "retention")
 			By("01/01 00:01 1st block is opened")
 			t1 := clock.Now()
 			Eventually(func() []tsdb.BlockState {
@@ -562,9 +563,12 @@ var _ = Describe("Shard", func() {
 					TimeRange: timestamp.NewTimeRangeDuration(t1, 12*time.Hour, true, false),
 				},
 			}))
-			By("01/01 11:00 2nd block is opened")
-			forward(10, "BlockID-19700101-01-1", "SegID-19700101-1")
-			t2 := clock.Now().Add(2 * time.Hour)
+			By("01/01 12:00 2nd block is opened")
+			forward(11, "BlockID-19700101-01-1", "SegID-19700101-1")
+			t2 := clock.Now().Add(1 * time.Hour)
+			By("01/01 14:00 moves to the 2nd block")
+			forward(2, "BlockID-19700101-01-1", "SegID-19700101-1")
+			started("BlockID-19700101-13-1")
 			Eventually(func() []tsdb.BlockState {
 				return shard.State().Blocks
 			}, flags.EventuallyTimeout).Should(Equal([]tsdb.BlockState{
@@ -584,9 +588,6 @@ var _ = Describe("Shard", func() {
 					TimeRange: timestamp.NewTimeRangeDuration(t2, 11*time.Hour, true, false),
 				},
 			}))
-			Eventually(func() []tsdb.BlockID {
-				return shard.State().OpenBlocks
-			}, flags.EventuallyTimeout).Should(Equal([]tsdb.BlockID{}))
 		})
 	})
 })