google / cloudprint_logocert

Google Cloud Print Logo Certification Automation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'Unregister' test may be failed due to tokens have expired

YoshimiMorita opened this issue · comments

I continue running 'RunAfter24Hours' and 'Unregister' tests.
In this case, the day after started 'RunAfter24Hours', I will do a UserAction for 'Unregister'.
(i.e. "Press ENTER once printer is powered off")

If the wait time for this UserAction operation is more than 1 hour, tokens will be expired.
So that, the call _device.UnRegister() failed. (error code: 403)

I think it's better to refresh tokens because the user does not always possible to do a UserAction immediately after 'RunAfter24Hours' test is completed.

For example,
Step 1) Add WaitForUserAction after starting 'Unregister' (or after completing 'RunAfter24Hours)
Step 2) Do a UserAction
Step 3) Refresh Oauth access token, if necessary.
Step 4) Run testUnregisterDevice() test.
etc.

commented

Hi,

Thanks for notifying us of this error.

Yes, this is indeed an issue that can likely occur when Unregister() runs right after RunAfter24Hours().
Since every test suite refreshes tokens when it first starts up, I have just added a pause right after the 24 hr test case to make sure the user is ready to continue testing.

commit: 08e3535

Please pull from master to update.

Thanks,
Kevin

Hi Kevin-san,

Thank you very much for your quick action.
I will pull this change, and verify it.

This issue was fixed. Thanks!