HDDS-1389. Fix testSCMChillModeRestrictedOp. (#696)
This commit is contained in:
parent
89f9c8604b
commit
5750bb94ed
@ -88,16 +88,25 @@ public ChillModeHandler(Configuration configuration,
|
|||||||
@Override
|
@Override
|
||||||
public void onMessage(ChillModeStatus chillModeStatus,
|
public void onMessage(ChillModeStatus chillModeStatus,
|
||||||
EventPublisher publisher) {
|
EventPublisher publisher) {
|
||||||
try {
|
|
||||||
isInChillMode.set(chillModeStatus.getChillModeStatus());
|
isInChillMode.set(chillModeStatus.getChillModeStatus());
|
||||||
scmClientProtocolServer.setChillModeStatus(isInChillMode.get());
|
scmClientProtocolServer.setChillModeStatus(isInChillMode.get());
|
||||||
scmBlockManager.setChillModeStatus(isInChillMode.get());
|
scmBlockManager.setChillModeStatus(isInChillMode.get());
|
||||||
|
|
||||||
|
if (!isInChillMode.get()) {
|
||||||
|
final Thread chillModeExitThread = new Thread(() -> {
|
||||||
|
try {
|
||||||
Thread.sleep(waitTime);
|
Thread.sleep(waitTime);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
} finally {
|
|
||||||
replicationManager.start();
|
|
||||||
}
|
}
|
||||||
|
replicationManager.start();
|
||||||
|
});
|
||||||
|
|
||||||
|
chillModeExitThread.setDaemon(true);
|
||||||
|
chillModeExitThread.start();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getChillModeStatus() {
|
public boolean getChillModeStatus() {
|
||||||
|
Loading…
Reference in New Issue
Block a user