Skip to content

resolution_test.py uses deprecated GDK function #2256

@bladernr

Description

@bladernr

Bug Description

On a recent Noble SRU test: https://certification.canonical.com/hardware/202008-28109/submission/463479/

the resolution_test.py job failed, and while looking into that I noticed the deprecation warning. This should be addressed to clear these warnings (noise) from the results and also to be ready for when this function goes away.

/tmp/nest-l_nt8jg2.6e83b59da52f9107948b3064f37269c15a2f7b95244dd45ed99038120adfb1b6/resolution_test.py:24: DeprecationWarning: Gdk.Screen.get_primary_monitor is deprecated
geom = screen.get_monitor_geometry(screen.get_primary_monitor())
/tmp/nest-l_nt8jg2.6e83b59da52f9107948b3064f37269c15a2f7b95244dd45ed99038120adfb1b6/resolution_test.py:24: DeprecationWarning: Gdk.Screen.get_monitor_geometry is deprecated
geom = screen.get_monitor_geometry(screen.get_primary_monitor())

Cert-blocker Test Case

  • cert-blocker

To Reproduce

run sru and the resolution test
notice deprecation warnings

Expected Result

we are not using deprecated functions, or if older versions of GDK still need to be supported, the code handles both cases (tests for new versions and then falls back to the old one when needed).

Actual Result

currently we call a function throwing a deprecation warning

Environment

SRU: stock noble linux-generic
Jenkins URL: http://10.102.156.15:8080/job/cert-stock-sru-noble-desktop-prodesk-400-g7-sku3-28109/37/

Relevant log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions