[
https://issues.apache.org/jira/browse/YARN-9270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767085#comment-16767085
]
Peter Bacsko commented on YARN-9270:
------------------------------------
" could we remove the wildcard import import java.util.*."
Certainly, let's do this in YARN-9266.
"don't see why the constructor of Configuration is called with false"
[...]
"Also the 5th testcase (testLinuxFpgaResourceDiscoverPluginWithSdkRootSet) uses
another Conifiguration object in the original testcase"
I think the idea here is that the original conf object was created with "false"
so that it doesn't load the default values, but in that particular test (5th),
we do. I see no significant difference though. Just tried it, test result is
the same.
I'm also thinking about making {{FpgaDiscoverer}} non-singleton. It's much
better to test that way.
> Minor cleanup in TestFpgaDiscoverer
> -----------------------------------
>
> Key: YARN-9270
> URL: https://issues.apache.org/jira/browse/YARN-9270
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
> Attachments: YARN-9270-001.patch
>
>
> Let's do some cleanup in this class.
> * {{testLinuxFpgaResourceDiscoverPluginConfig}} - this test should be split
> up to 5 different tests, because it tests 5 different scenarios.
> * remove {{setNewEnvironmentHack()}} - too complicated. We can introduce a
> {{Function}} in the plugin class like {{Function<String, String> envProvider
> = System::getenv()}} plus a setter method which allows the test to modify
> {{envProvider}}. Much simpler and straightfoward.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]