I added the TestFSNamesystem to be a class for adding future unit tests for the same source class. The test is not really HA specific since the dups can occur in the edits.dirs config itself right?
The test is HA-specific in that it's meant to test configuration of the shared edits dir, which itself is HA-specific. The fact that it also happens to test for overlaps within the edits dir configuration seems incidental to me. In fact, I would prefer if the test were more isolated so that it doesn't test for overlaps within the edits dir configuration. We should add a separate test for that behavior.
The unit test tests what the function does. So IMO it makes sense the way its written currently. The fact that we currently support a single shared edits dir is not related to the test and should be ideally covered in a functional sanity test for the HA config feature right?
Sure, but the test is strictly less realistic than it could be because of this. Better to verify the behavior under the conditions we expect users to use, rather than some theoretical case which isn't currently supported.
Also, if the test is left as-is, whenever
HDFS-2752 gets implemented, this test will need to be amended because it will no longer be valid.