Di Wang is correct a great many changes are needed. Not quite every line will have to be touched touched but pretty close.
I am a bit of a ways into a rewrite for sanity-scrub and so far a few spots in test-framework have also be identified.
There seems to be some loose timing built into this test in general. Spots where you expect a given transition state, I am not sure if these time checks will work as well with DNE. I am not going to focus on Logic changes to the test at this point just a conversion to DNE safe calls for v1.
I think an incremental approach to these changes keep the reviewing of all of this sane, the removal of SINGLEMDS is no small task even just in this one test. I will work on getting some form of a reviewable patch into the system tomorrow that is not a totally a for_test_only sort of patch and setup a proper expect always to allow DNE to run a few tests.
My approach is slightly different that Di Wangs so I will open a new patch or two. I like use of helper functions to make the test more readable and radically decrease the amount of code.
for instance my test_0 presently looks like:
Patch has landed to Master. Please let me know if more work is needed in this ticket and I will reopen.