Skip to content

Commit

Permalink
lints changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Jan 9, 2024
1 parent f260377 commit 54445a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
11 changes: 4 additions & 7 deletions src/controller/python/test/test_scripts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,6 @@ def TestSubscriptionResumptionCapacityStep1(self, nodeid: int, endpoint: int, su

def TestSubscriptionResumptionCapacityStep2(self, nodeid: int, endpoint: int, remote_ip: str, ssh_port: int,
remote_server_app: str, subscription_capacity: int):
remoteDeviceRestarted = False
updateLock = threading.Lock()
updateCv = threading.Condition(updateLock)

Expand Down Expand Up @@ -1474,7 +1473,6 @@ def run(self):
os.path.join(CHIP_REPO, "out/debug/standalone", self.remote_server_app),
self.subscription_capacity))
with updateLock:
remoteDeviceRestarted = True
updateCv.notifyAll()

finally:
Expand All @@ -1485,11 +1483,10 @@ def run(self):
restartRemoteThread = _restartRemoteDevice(remote_ip, ssh_port, remote_server_app, subscription_capacity)
restartRemoteThread.start()
with updateCv:
while remoteDeviceRestarted is False:
if not updateCv.wait(8.0):
self.logger.error(
"Failed to restart the remote device")
break
if not updateCv.wait(8.0):
self.logger.error(
"Failed to restart the remote device")

# Wait for some time so that the device will be resolving the address of the first controller
time.sleep(3)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import os
import sys
import time
from optparse import OptionParser

from base import BaseTestHelper, FailIfNot, TestFail, TestTimeout, logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import os
import sys
import time
from optparse import OptionParser

from base import BaseTestHelper, FailIfNot, TestFail, TestTimeout, logger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import os
import sys
import time
from optparse import OptionParser

from base import BaseTestHelper, FailIfNot, TestFail, TestTimeout, logger
Expand Down

0 comments on commit 54445a1

Please sign in to comment.