Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Restructuring OnResetTimeout (Part 2) #2147

Conversation

HSavynetska
Copy link
Contributor

@HSavynetska HSavynetska commented Nov 14, 2018

ATF Test Scripts to check #2422

This PR is not ready for review.

Summary

Script for "Restructuring OnResetTimeout"

ATF version

Develop branch

CLA

@dboltovskyi dboltovskyi changed the title [Part2] Restructuring OnResetTimeout [WIP] Restructuring OnResetTimeout (Part 2) Nov 14, 2018
-- User story: TBD
-- Use case: TBD
--
-- Requirement summary: TBD
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Propose to remove all lines with TBD.

config.application1.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" }
config.application2.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" }
config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5
config.application2.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Currently ATF already has majorVersion = 5 for all apps

---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultProtocolVersion = 2
config.ValidateSchema = false
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Why do we need switch off this parameter? Guess it's copy-paste from RC module. But this is not required now.

commonSteps:DeletePolicyTable()
commonSteps:DeleteLogsFiles()
commonPreconditions:BackupFile(preloadedPT)
updatePreloadedPT()
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska There are functions for backup and update preloaded PT file, however there is no function to restore it.

RUN_AFTER(sendOnResetTimeout, pParams.notificationTime)
end


Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Extra new line

:ValidIf(function()
local respTime = timestamp()
local timeBetweenRespAndNot = respTime - c.notificationTime
if timeBetweenRespAndNot >= pRespTimeExpect - 500 and timeBetweenRespAndNot <= pRespTimeExpect + 500 then
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska For now tolerance 500 ms has to be increased due to ATF issue with timers.
I propose to create a variable for this value and used it everywhere. In the future, when ATF issue is fixed it will be easy to decrease it.

local rpcResponse = { success = false, resultCode = "GENERIC_ERROR" }

--[[ Local Functions ]]
local function invaliParamOnResetTimeout(pData, pParams)
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Typo invali
The same in script 007 and 008

-- 5) HMI does not respond
-- SDL does:
-- 1) Respond in 11 seconds with GENERIC_ERROR resultCode to mobile app to first request
-- 2) Respond in 14 seconds with GENERIC_ERROR resultCode to mobile app to second request
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Actually 1st response will be sent in 10 sec. and 2nd one - in 13 sec.

--[[ Local Functions ]]
local function twoRequestsinSameTime()
common.rpcs.DiagnosticMessage(12000, 11000,
common.withoutResponseWithOnResetTimeout, paramsForRespFunction, common.rpcResponse)
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska common.rpcResponse doesn't exist.
The same in line 42

-- 5) HMI does not respond to both request
-- SDL does:
-- 1) Respond in 11 seconds with GENERIC_ERROR resultCode to mobile app to first request
-- 2) Respond in 14 seconds with GENERIC_ERROR resultCode to mobile app to second request
Copy link
Contributor

Choose a reason for hiding this comment

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

@HSavynetska Actually responses will be sent in 10 and 13 sec.

@GetmanetsIrina GetmanetsIrina force-pushed the feature/restructuring_OnResetTimeout branch from 8231b08 to 63d899f Compare November 16, 2018 13:49
@GetmanetsIrina GetmanetsIrina merged commit fc79304 into smartdevicelink:feature/restructuring_OnResetTimeout Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants