This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch fix-rename-npe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/fix-rename-npe by this push:
new b2cfba3f625 Add UT
b2cfba3f625 is described below
commit b2cfba3f6255727ed28d430c2be7742aeb2da9c2
Author: Yongzao <[email protected]>
AuthorDate: Tue Oct 14 19:50:14 2025 +0800
Add UT
---
.../request/ConfigPhysicalPlanSerDeTest.java | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanSerDeTest.java
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanSerDeTest.java
index 6925fef09dc..4381c120cb4 100644
---
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanSerDeTest.java
+++
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanSerDeTest.java
@@ -65,6 +65,7 @@ import org.apache.iotdb.commons.udf.UDFInformation;
import org.apache.iotdb.commons.udf.UDFType;
import org.apache.iotdb.commons.utils.TimePartitionUtils;
import org.apache.iotdb.confignode.consensus.request.write.auth.AuthorPlan;
+import
org.apache.iotdb.confignode.consensus.request.write.auth.AuthorRelationalPlan;
import org.apache.iotdb.confignode.consensus.request.write.auth.AuthorTreePlan;
import
org.apache.iotdb.confignode.consensus.request.write.confignode.ApplyConfigNodePlan;
import
org.apache.iotdb.confignode.consensus.request.write.confignode.RemoveConfigNodePlan;
@@ -644,6 +645,36 @@ public class ConfigPhysicalPlanSerDeTest {
new ArrayList<>());
req1 = (AuthorTreePlan)
ConfigPhysicalPlan.Factory.create(req0.serializeToByteBuffer());
Assert.assertEquals(req0, req1);
+
+ // rename user
+ req0 =
+ new AuthorTreePlan(
+ ConfigPhysicalPlanType.RenameUser,
+ "oldUserName",
+ "",
+ "",
+ "",
+ new HashSet<>(),
+ false,
+ new ArrayList<>(),
+ 233,
+ "newUserName");
+ req1 = (AuthorTreePlan)
ConfigPhysicalPlan.Factory.create(req0.serializeToByteBuffer());
+ Assert.assertEquals(req0, req1);
+ req0 =
+ new AuthorRelationalPlan(
+ ConfigPhysicalPlanType.RRenameUser,
+ "oldUserName",
+ "",
+ "",
+ "",
+ new HashSet<>(),
+ false,
+ "",
+ 666,
+ "newUserName");
+ req1 = (AuthorRelationalPlan)
ConfigPhysicalPlan.Factory.create(req0.serializeToByteBuffer());
+ Assert.assertEquals(req0, req1);
}
@Test