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

amatya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 85af2c83403 only create used and unused segments once to make the test 
faster (#15533)
85af2c83403 is described below

commit 85af2c8340360b5a28bbcaece1c73e968b32cc65
Author: TestBoost <[email protected]>
AuthorDate: Mon Dec 11 22:01:04 2023 -0600

    only create used and unused segments once to make the test faster (#15533)
---
 .../common/actions/RetrieveSegmentsActionsTest.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git 
a/indexing-service/src/test/java/org/apache/druid/indexing/common/actions/RetrieveSegmentsActionsTest.java
 
b/indexing-service/src/test/java/org/apache/druid/indexing/common/actions/RetrieveSegmentsActionsTest.java
index 1b224b79856..24d2f0a9043 100644
--- 
a/indexing-service/src/test/java/org/apache/druid/indexing/common/actions/RetrieveSegmentsActionsTest.java
+++ 
b/indexing-service/src/test/java/org/apache/druid/indexing/common/actions/RetrieveSegmentsActionsTest.java
@@ -28,8 +28,8 @@ import org.apache.druid.timeline.DataSegment;
 import org.apache.druid.timeline.partition.NoneShardSpec;
 import org.joda.time.Interval;
 import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
 import org.junit.Test;
 
 import java.io.IOException;
@@ -40,15 +40,15 @@ public class RetrieveSegmentsActionsTest
 {
   private static final Interval INTERVAL = 
Intervals.of("2017-10-01/2017-10-15");
 
-  @Rule
-  public TaskActionTestKit actionTestKit = new TaskActionTestKit();
+  @ClassRule
+  public static TaskActionTestKit actionTestKit = new TaskActionTestKit();
 
-  private Task task;
-  private Set<DataSegment> expectedUnusedSegments;
-  private Set<DataSegment> expectedUsedSegments;
+  private static Task task;
+  private static Set<DataSegment> expectedUnusedSegments;
+  private static Set<DataSegment> expectedUsedSegments;
 
-  @Before
-  public void setup() throws IOException
+  @BeforeClass
+  public static void setup() throws IOException
   {
     task = NoopTask.create();
 
@@ -77,7 +77,7 @@ public class RetrieveSegmentsActionsTest
     expectedUnusedSegments.forEach(s -> 
actionTestKit.getSegmentsMetadataManager().markSegmentAsUnused(s.getId()));
   }
 
-  private DataSegment createSegment(Interval interval, String version)
+  private static DataSegment createSegment(Interval interval, String version)
   {
     return new DataSegment(
         task.getDataSource(),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to