You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Szilard Nemeth (JIRA)" <ji...@apache.org> on 2019/02/22 15:11:00 UTC
[jira] [Updated] (YARN-9121) Users of GpuDiscoverer.getInstance()
are not possible to test as instance is a static field
[ https://issues.apache.org/jira/browse/YARN-9121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Szilard Nemeth updated YARN-9121:
---------------------------------
Description:
The clients of GpuDiscoverer are very hard to test as they call GpuDiscoverer.getInstance() internally.
For example, writing tests for org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.GpuResourcePlugin#getNMResourceInfo is quite hard as the GpuDeviceInformation returned by GpuDiscoverer is not interchangeable as GpuDiscoverer is not mockable since we cannot inject it in tests.
> Users of GpuDiscoverer.getInstance() are not possible to test as instance is a static field
> -------------------------------------------------------------------------------------------
>
> Key: YARN-9121
> URL: https://issues.apache.org/jira/browse/YARN-9121
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: Szilard Nemeth
> Assignee: Szilard Nemeth
> Priority: Major
> Attachments: YARN-9121.001.patch
>
>
> The clients of GpuDiscoverer are very hard to test as they call GpuDiscoverer.getInstance() internally.
> For example, writing tests for org.apache.hadoop.yarn.server.nodemanager.containermanager.resourceplugin.gpu.GpuResourcePlugin#getNMResourceInfo is quite hard as the GpuDeviceInformation returned by GpuDiscoverer is not interchangeable as GpuDiscoverer is not mockable since we cannot inject it in tests.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org