Skip to content

Commit fd6a76e

Browse files
Umeshkumar9414ukumawat
andauthored
PHOENIX-7741 Remove usage of isRegionInTransition method from phoenix tests (#2330)
--------- Co-authored-by: ukumawat <ukumawat@salesforce.com>
1 parent 4d0905a commit fd6a76e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

phoenix-core/src/it/java/org/apache/phoenix/rpc/PhoenixServerRpcIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,14 @@ private void ensureTablesOnDifferentRegionServers(String tableName1, String tabl
243243
}
244244
byte[] encodedRegionNameInBytes = hri2.getEncodedNameAsBytes();
245245
admin.move(encodedRegionNameInBytes, dstServer.getServerName());
246+
// verify that both HMaster and Region server are aware of this movement
246247
while (
247248
dstServer.getOnlineRegion(hri2.getRegionName()) == null
248249
|| dstServer.getRegionsInTransitionInRS().containsKey(encodedRegionNameInBytes)
249250
|| srcServer.getRegionsInTransitionInRS().containsKey(encodedRegionNameInBytes)
250-
|| master.getAssignmentManager().getRegionStates().isRegionInTransition(hri2)
251+
|| !ServerName.isSameAddress(
252+
master.getAssignmentManager().getRegionStates().getRegionServerOfRegion(hri2),
253+
dstServer.getServerName())
251254
) {
252255
// wait for the move to be finished
253256
Thread.sleep(1);

0 commit comments

Comments
 (0)