RedHatQE / polarize

GNU General Public License v3.0
2 stars 2 forks source link

The updateMapping function is adding to the mapping.json even if nothing changed #46

Closed rarebreed closed 7 years ago

rarebreed commented 7 years ago

The logic for when to write to the mapping file was not right. Even if the method/project was already in the mapping file with the same ID, the updateMapping file would print a message saying it was editing the mapping file. However, this is unnecessary if the ID is the same. This can happen when the annotation's testCaseID == "", but it exists in either the XML or mapping file. While this is not wrong per se, it is confusing due to the logging message, and also hurts performance by needing to unnecessarily open the mapping file and write to it.

To prevent the logging message and for performance, do not edit the mapping file if it's not necessary

rarebreed commented 7 years ago

Fixed in e08ee96