-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nested interval when updating devices from node. (#902)
* Remove nested setInterval. My previous PR has nested setInterval calls to update node devices. * Aligning the values (5 minutes) for interval check on: node-availabilities (remove stale devices), update-device (sending node devices to hub), and release-blocked-devices. * Ignore session filter and use udid instead when checking/releasing blocked devices. It will solely depends onlastCmdExecutedAt. * Catch error when sending device updates to hub. The callers have never aware of the potential failure. * Add test for releasing blocked device based onlastCmdExecutedAt * Renames some methods to reduce ambiguity. E.g.: checkNodeServerAvailability to setupCronCheckNodesAvailability
- Loading branch information
Showing
44 changed files
with
49,126 additions
and
20,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ lib/ | |
local_appium_home/ | ||
.nyc_output/ | ||
site | ||
appium-e2e-test | ||
temp-appium | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,10 +45,10 @@ jobs: | |
- script: | | ||
$ANDROID_HOME/platform-tools/adb devices | ||
echo '---' | ||
nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | ||
nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-any-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | ||
echo '---' | ||
echo '---' | ||
nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator1 -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | ||
nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator1 -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-any-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | ||
echo '---' | ||
$ANDROID_HOME/platform-tools/adb devices | ||
displayName: "start Android emulator" | ||
|
@@ -68,12 +68,41 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./server-config.json & | ||
npm run test-e2e | ||
displayName: 'E2E Test' | ||
- job: E2EHubAndNodeTest | ||
pool: | ||
vmImage: 'macOS-latest' | ||
|
||
steps: | ||
- task: [email protected] | ||
inputs: | ||
versionSpec: '16.x' | ||
|
||
- bash: | | ||
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86' | ||
displayName: "install Android image" | ||
- script: | | ||
$ANDROID_HOME/emulator/emulator -list-avds | ||
echo '---' | ||
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n test_android_emulator -k 'system-images;android-27;google_apis;x86' --force | ||
echo '---' | ||
$ANDROID_HOME/emulator/emulator -list-avds | ||
displayName: "create AVD" | ||
- script: | | ||
$ANDROID_HOME/platform-tools/adb devices | ||
echo '---' | ||
nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82' | ||
echo '---' | ||
$ANDROID_HOME/platform-tools/adb devices | ||
displayName: "start Android emulator" | ||
- script: | | ||
npm ci | ||
npm run test-e2e-hubnode | ||
displayName: 'E2E Hub and Node Test' | ||
- job: E2EPluginBrowserStackTest | ||
pool: | ||
vmImage: 'macOS-latest' | ||
|
@@ -85,9 +114,7 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./serverConfig/bs-config.json & | ||
npm run test-e2e-browserstack | ||
displayName: 'E2E Test' | ||
|
@@ -102,10 +129,8 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./serverConfig/pcloudy-config.json & | ||
npm run test-e2e-pCloudy | ||
npm run test-e2e-pcloudy | ||
displayName: 'E2E Test' | ||
- job: BrowserStack_mac | ||
|
@@ -119,11 +144,10 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
export CLOUD_USERNAME=$BS_USERNAME | ||
export CLOUD_KEY=$BS_PASSWORD | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./serverConfig/bs-config.json & | ||
npm run test-parallel-bs | ||
displayName: 'E2E Test' | ||
|
@@ -138,11 +162,9 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
export CLOUD_USERNAME=$BS_USERNAME | ||
export CLOUD_KEY=$BS_PASSWORD | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./serverConfig/bs-config.json & | ||
npm run test-parallel-ios-bs | ||
displayName: 'E2E Test BS Linux' | ||
|
@@ -174,10 +196,8 @@ jobs: | |
|
||
- script: | | ||
npm ci | ||
export APPIUM_HOME=/tmp/device-farm | ||
export CLOUD_USERNAME=$LT_USERNAME | ||
export CLOUD_KEY=$LT_PASSWORD | ||
./node_modules/.bin/appium plugin install --source=local . | ||
nohup ./node_modules/.bin/appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --config=./serverConfig/lt-config.json & | ||
npm run test-parallel-lt | ||
displayName: 'E2E Test' | ||
displayName: 'E2E Test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.