Looking at the code, remove volumes at DataNode can potentially interrupt BlockReceiver and if the BlockReceiver happens to be in some IO operations like flushing or setting channel position for the new checksum then it can throw IOException. BlockReceiver on getting IOexception, starts a thread to check for disk errors.
TestDataNodeHotSwapVolumes#testRemoveVolumeBeingWritten verification fails if the DataNode ever started a disk error check thread. This verification doesn't seem to be fruitful as we already have another verification for checking the block replication factor. So, the proposal here is to replace this not so useful verification with another verification to check for if the disk removal happened successfully and if the replication factor of the block caught up even after the volume removal.