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

slfan1989 pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new 547637788d9 YARN-11822. Fix flaky unit test in 
TestFederationProtocolRecords (#7718) Contributed by Peter Szucs.
547637788d9 is described below

commit 547637788d94bf542a7cde052a440d7fd7349759
Author: Peter Szucs <116345192+p-sz...@users.noreply.github.com>
AuthorDate: Thu Jun 5 14:06:57 2025 +0200

    YARN-11822. Fix flaky unit test in TestFederationProtocolRecords (#7718) 
Contributed by Peter Szucs.
    
    * YARN-11822. Fix flaky unit test in TestFederationProtocolRecords
    
    Reviewed-by: Shilun Fan <slfan1...@apache.org>
    Signed-off-by: Shilun Fan <slfan1...@apache.org>
---
 .../federation/store/records/TestFederationProtocolRecords.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java
index e4854e4f8bb..861acabb36e 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/server/federation/store/records/TestFederationProtocolRecords.java
@@ -425,16 +425,17 @@ public void testSubClusterInfoEqual() throws Exception {
     String scRmAdminAddress = "5.6.7.8:7";
     String scWebAppAddress = "127.0.0.1:8080";
     String capabilityJson = "-";
+    long currentTime = Time.now();
 
     SubClusterInfo sc1 =
         SubClusterInfo.newInstance(SubClusterId.newInstance("SC-1"),
         scAmRMAddress, scClientRMAddress, scRmAdminAddress, scWebAppAddress,
-        SubClusterState.SC_RUNNING, Time.now(), capabilityJson);
+        SubClusterState.SC_RUNNING, currentTime, capabilityJson);
 
     SubClusterInfo sc2 =
         SubClusterInfo.newInstance(SubClusterId.newInstance("SC-1"),
         scAmRMAddress, scClientRMAddress, scRmAdminAddress, scWebAppAddress,
-        SubClusterState.SC_RUNNING, Time.now(), capabilityJson);
+        SubClusterState.SC_RUNNING, currentTime, capabilityJson);
 
     assertEquals(sc1, sc2);
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to