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

krathbun pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 3f75927314 Replacing mocks of TabletId with TabletId.of() (#5718)
3f75927314 is described below

commit 3f75927314155b7a0a43ade58c1ac8acba4a715f
Author: Imirie Billey <148128385+ibill...@users.noreply.github.com>
AuthorDate: Tue Jul 8 12:03:04 2025 -0400

    Replacing mocks of TabletId with TabletId.of() (#5718)
    
    Using the TabletId.of() method created in PR #5678, replaced instances of 
TabletId mocks in ConstraintCheckerTest.java.
    
    Closes #5705
---
 .../accumulo/tserver/constraints/ConstraintCheckerTest.java       | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/server/tserver/src/test/java/org/apache/accumulo/tserver/constraints/ConstraintCheckerTest.java
 
b/server/tserver/src/test/java/org/apache/accumulo/tserver/constraints/ConstraintCheckerTest.java
index fc7a5b06e0..63cf4c52b4 100644
--- 
a/server/tserver/src/test/java/org/apache/accumulo/tserver/constraints/ConstraintCheckerTest.java
+++ 
b/server/tserver/src/test/java/org/apache/accumulo/tserver/constraints/ConstraintCheckerTest.java
@@ -34,10 +34,10 @@ import java.util.Set;
 
 import org.apache.accumulo.core.data.ConstraintViolationSummary;
 import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.core.data.TableId;
 import org.apache.accumulo.core.data.TabletId;
 import org.apache.accumulo.core.data.constraints.Constraint;
 import org.apache.accumulo.core.data.constraints.Constraint.Environment;
-import org.apache.hadoop.io.Text;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
@@ -46,7 +46,6 @@ public class ConstraintCheckerTest {
   private ConstraintChecker cc;
   private ArrayList<Constraint> constraints;
   private Environment env;
-  private TabletId tabletId;
   private Mutation m;
   private Mutation m2;
 
@@ -57,13 +56,11 @@ public class ConstraintCheckerTest {
     expect(cc.getConstraints()).andReturn(constraints);
 
     env = createMock(Environment.class);
-    tabletId = createMock(TabletId.class);
+    TabletId tabletId = TabletId.of(TableId.of("id"), "d", "a");
     expect(env.getTablet()).andReturn(tabletId);
 
     m = createMock(Mutation.class);
     m2 = createMock(Mutation.class);
-    expect(tabletId.getEndRow()).andReturn(new Text("d")).anyTimes();
-    expect(tabletId.getPrevEndRow()).andReturn(new Text("a")).anyTimes();
     expect(m.getRow()).andReturn("b".getBytes(UTF_8)).anyTimes();
     expect(m2.getRow()).andReturn("z".getBytes(UTF_8)).anyTimes();
   }
@@ -88,7 +85,6 @@ public class ConstraintCheckerTest {
   }
 
   private void replayAll() {
-    replay(tabletId);
     replay(env);
     replay(cc);
     replay(m);

Reply via email to