Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartDeviceLink/sdl_core/issues/1880
---------------------------------------------------------------------------------------------------
-- In case
-- SDL transfers *RPC with own timeout from mobile app to HMI (please see list with impacted *RPCs below)
-- and HMI does NOT respond during <DefaultTimeout> + <*RPCs_own_timeout> (please see APPLINK-27495)
-- SDL must:
-- respond 'GENERIC_ERROR, success:false' to mobile app
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require("test_scripts/Defects/4_5/1880/common")

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local imageName = "icon.png"

local AlertRequestParams = {
alertText1 = "alertText1",
duration = 7000
}
local AlertRequestParamsWithoutDuration = {
alertText1 = "alertText1",
ttsChunks = {
{
text = "TTSChunk",
type = "TEXT",
}
},
}

local SliderRequetsParams = {
numTicks = 3,
position = 2,
sliderHeader ="sliderHeader",
sliderFooter = {"1", "2", "3"},
timeout = 7000
}
local SliderRequetsParamsWithoutTimeout = {
numTicks = 3,
position = 2,
sliderHeader ="sliderHeader",
sliderFooter = {"1", "2", "3"},
}

local ScrollableMessageRequestParamsWithSoftButtons = {
scrollableMessageBody = "abc",
softButtons = {
{
softButtonID = 1,
text = "Button1",
type = "IMAGE",
image =
{
value = imageName,
imageType = "DYNAMIC"
},
isHighlighted = false,
systemAction = "DEFAULT_ACTION"
},
{
softButtonID = 2,
text = "Button2",
type = "IMAGE",
image =
{
value = imageName,
imageType = "DYNAMIC"
},
isHighlighted = false,
systemAction = "DEFAULT_ACTION"
}
},
timeout = 7000
}
local ScrollableMessageRequestParamsWithoutSoftButtons = {
scrollableMessageBody = "abc",
timeout = 3000
}
local ScrollableMessageRequestParamsWithoutTimeout = {
scrollableMessageBody = "abc",
}

--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("RAI, PTU", common.registerNoPTU)
runner.Step("Activate App", common.activate)
runner.Step("Upload file", common.putFile, { imageName })

runner.Title("Test")
runner.Step("Alert_default_timeout_and_Alert_timeout", common.alert, { AlertRequestParams })
runner.Step("Alert_default_timeout", common.alert, { AlertRequestParamsWithoutDuration })

runner.Step("Slider_default_timeout_and_Slider_timeout", common.slider, { SliderRequetsParams })
runner.Step("Slider_default_timeout", common.slider, { SliderRequetsParamsWithoutTimeout })

runner.Step("ScrollableMessage_default_timeout_and_ScrMes_timeout_with_softButtons", common.scrollableMessage,
{ ScrollableMessageRequestParamsWithSoftButtons })
runner.Step("ScrollableMessage_default_timeout_and_ScrMes_timeout_without_softButtons", common.scrollableMessage,
{ ScrollableMessageRequestParamsWithoutSoftButtons })
runner.Step("ScrollableMessage_default_timeout", common.scrollableMessage,
{ ScrollableMessageRequestParamsWithoutTimeout })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartDeviceLink/sdl_core/issues/1880
---------------------------------------------------------------------------------------------------
-- Description: In case SDL transfers PerformInteraction(BOTH) with own timeout from mobile app to HMI
-- and HMI does NOT respond during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL must respond 'GENERIC_ERROR, success:false' to mobile app
--
-- Steps:
-- 1. HMI and SDL are started
-- 2. Mobile app is registered and activated
-- 3. CreateInteractionChoiceSet is added
-- 4. Mobile app requests PerformInteraction(BOTH)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting VR response
-- 5. HMI does not respond to UI and VR requests during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after <DefaultTimeout> + <*RPCs_own_timeout> is expired

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expectation is failing since core is not sending a GENERIC_ERROR response within that specified timeout.

[09:49:14,866] PerformInteraction_default_timeout_and_PI_timeout                                     [FAIL] (21588 ms)
 Response to 4: Timeout: Response to 4: Timeout expired

Looking at the core logs, this seems to be due to UpdateRequestTimeout being called in PerformInteractionRequest::OnTimeOut() for the BOTH interactionMode.

sdl_core/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc:308 commands::PerformInteractionRequest::OnTimeOut: Enter
sdl_core/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc:312 commands::PerformInteractionRequest::OnTimeOut: Interaction Mode: BOTH
sdl_core/src/components/application_manager/src/application_manager_impl.cc:3035 ApplicationManagerImpl::UpdateRequestTimeout: Enter
sdl_core/src/components/application_manager/src/request_controller_impl.cc:464 request_controller::RequestControllerImpl::UpdateRequestTimeout: Enter
sdl_core/src/components/application_manager/src/request_controller_impl.cc:465 request_controller::RequestControllerImpl::UpdateRequestTimeout: app_id : 65537 mobile_correlation_id : 4 new_timeout : 25000
sdl_core/src/components/application_manager/src/commands/command_request_impl.cc:180 commands::CommandRequestImpl::OnUpdateTimeOut: Enter
sdl_core/src/components/application_manager/src/commands/command_request_impl.cc:180 commands::CommandRequestImpl::OnUpdateTimeOut: Exit
sdl_core/src/components/application_manager/src/request_controller_impl.cc:702 request_controller::RequestControllerImpl::NotifyTimer: Enter
sdl_core/src/components/application_manager/src/request_controller_impl.cc:702 request_controller::RequestControllerImpl::NotifyTimer: Exit
sdl_core/src/components/application_manager/src/request_controller_impl.cc:489 request_controller::RequestControllerImpl::UpdateRequestTimeout: Timeout updated for  app_id: 65537 correlation_id: 4 new_timeout (ms): 25000
sdl_core/src/components/application_manager/src/request_controller_impl.cc:464 request_controller::RequestControllerImpl::UpdateRequestTimeout: Exit
sdl_core/src/components/application_manager/src/application_manager_impl.cc:3035 ApplicationManagerImpl::UpdateRequestTimeout: Exit
sdl_core/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_interaction_request.cc:308 commands::PerformInteractionRequest::OnTimeOut: Exit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue smartdevicelink/sdl_core#3914 has been created according to scripts result.
This issue collects issues with timeouts for PerformInteraction, so maybe a merge of this issue should be related to the fix of smartdevicelink/sdl_core#3914

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, in that case I think #3914 should be added to the PR title and/or description

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 3914 to the description

-- 6. Mobile app requests PerformInteraction(BOTH)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting VR response
-- 7. HMI responds to VR request in 2 seconds
-- SDL does:
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting UI response
-- 8. HMI does not respond to UI request during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after expiration of <DefaultTimeout> + <*RPCs_own_timeout>
-- started after VR response receiving
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require("user_modules/script_runner")
local common = require("test_scripts/Defects/4_5/1880/common")

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local params_with_timeout = {
interactionMode = "BOTH",
timeout = 7000
}
local params_without_timeout = {
interactionMode = "BOTH"
}

--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("RAI, PTU", common.registerNoPTU)
runner.Step("Activate App", common.activate)
runner.Step("CreateInteractionChoiceSet", common.createInteractionChoiceSet)

runner.Title("Test")
runner.Step("PerformInteraction_default_timeout_and_PI_timeout", common.performInteraction,
{ params_with_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_and_PI_timeout_with_VR_response", common.performInteraction,
{ params_without_timeout, common.notSendUIresp, common.sendVRresp, common.timeToSendResp })
runner.Step("PerformInteraction_default_timeout_and_PI_default_timeout", common.performInteraction,
{ params_with_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_and_PI_default_timeout_with_VR_response", common.performInteraction,
{ params_without_timeout, common.notSendUIresp, common.sendVRresp, common.timeToSendResp })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartDeviceLink/sdl_core/issues/1880
---------------------------------------------------------------------------------------------------
-- Description: In case SDL transfers PerformInteraction(VR_ONLY) with own timeout from mobile app to HMI
-- and HMI does NOT respond during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL must respond 'GENERIC_ERROR, success:false' to mobile app
--
-- Steps:
-- 1. HMI and SDL are started
-- 2. Mobile app is registered and activated
-- 3. CreateInteractionChoiceSet is added
-- 4. Mobile app requests PerformInteraction(VR_ONLY)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting VR response
-- 5. HMI does not respond to UI and VR requests during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after <DefaultTimeout> + <*RPCs_own_timeout> is expired
-- 6. Mobile app requests PerformInteraction(VR_ONLY)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting VR response
-- 7. HMI responds to UI request in 2 seconds
-- 8. HMI does not respond to VR request during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after <DefaultTimeout> + <*RPCs_own_timeout> is expired
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require("user_modules/script_runner")
local common = require("test_scripts/Defects/4_5/1880/common")

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local params_with_timeout = {
interactionMode = "VR_ONLY",
timeout = 12000
}
local params_without_timeout = {
interactionMode = "VR_ONLY"
}

--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("RAI, PTU", common.registerNoPTU)
runner.Step("Activate App", common.activate)
runner.Step("CreateInteractionChoiceSet", common.createInteractionChoiceSet)

runner.Title("Test")
runner.Step("PerformInteraction_timeout_VR", common.performInteraction,
{ params_with_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_VR", common.performInteraction,
{ params_without_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_timeout_VR_with_UI_response", common.performInteraction,
{ params_with_timeout, common.sendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_VR_with_UI_response", common.performInteraction,
{ params_without_timeout, common.sendUIresp, common.notSendVRresp, common.noAdditionalTimeout })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartDeviceLink/sdl_core/issues/1880
---------------------------------------------------------------------------------------------------
-- Description: In case SDL transfers PerformInteraction(MANUAL_ONLY) with own timeout from mobile app to HMI
-- and HMI does NOT respond during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL must respond 'GENERIC_ERROR, success:false' to mobile app
--
-- Steps:
-- 1. HMI and SDL are started
-- 2. Mobile app is registered and activated
-- 3. CreateInteractionChoiceSet is added
-- 4. Mobile app requests PerformInteraction(MANUAL_ONLY)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting UI response
-- 5. HMI does not respond to UI and VR requests during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after <DefaultTimeout> + <*RPCs_own_timeout> is expired
-- 6. Mobile app requests PerformInteraction(MANUAL_ONLY)
-- SDL does:
-- - request VR.PerformInteraction and UI.PerformInteraction to HMI
-- - start timeout <DefaultTimeout> + <*RPCs_own_timeout> for expecting UI response
-- 7. HMI responds to VR request in 2 seconds
-- 8. HMI does not respond to UI request during <DefaultTimeout> + <*RPCs_own_timeout>
-- SDL does:
-- - respond 'GENERIC_ERROR, success:false' to mobile app after <DefaultTimeout> + <*RPCs_own_timeout> is expired
---------------------------------------------------------------------------------------------------
--[[ Required Shared libraries ]]
local runner = require("user_modules/script_runner")
local common = require("test_scripts/Defects/4_5/1880/common")

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local params_with_timeout = {
interactionMode = "MANUAL_ONLY",
timeout = 8000
}
local params_without_timeout = {
interactionMode = "MANUAL_ONLY"
}

--[[ Scenario ]]
runner.Title("Preconditions")
runner.Step("Clean environment", common.preconditions)
runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
runner.Step("RAI, PTU", common.registerNoPTU)
runner.Step("Activate App", common.activate)
runner.Step("CreateInteractionChoiceSet", common.createInteractionChoiceSet)

runner.Title("Test")
runner.Step("PerformInteraction_default_timeout_and_PI_timeout_with_VR_response", common.performInteraction,
{ params_with_timeout, common.notSendUIresp, common.sendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_and_PI_default_timeout_with_VR_response", common.performInteraction,
{ params_without_timeout, common.notSendUIresp, common.sendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_and_PI_timeout", common.performInteraction,
{ params_with_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })
runner.Step("PerformInteraction_default_timeout_and_PI_default_timeout", common.performInteraction,
{ params_without_timeout, common.notSendUIresp, common.notSendVRresp, common.noAdditionalTimeout })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Loading