[jitsi-dev] Bug in FileAccessService


#1

Hey

I was trying to get to the root of some repeatedly failing unit test while preparing the upgrade to JUnit 4.

The FailSafeTransaction.rollback does nothing if the destination file or the intermediate are still locked, e.g. from a File*putStream. This is because File.delete() fails and subsequently ptoF.renameTo(...)

The rollback should fail in this case by throwing an IOException. I'd fix it myself, but I cannot clone libjitsi currently. Can someone please give this a try?

Freundliche Grüsse,
Ingo Bauersachs

-- sent from my mobile


#2

Hey, Ingo

···

On 08/08/14 18:28, Ingo Bauersachs wrote:

Hey

I was trying to get to the root of some repeatedly failing unit test while preparing the upgrade to JUnit 4.

The FailSafeTransaction.rollback does nothing if the destination file or the intermediate are still locked, e.g. from a File*putStream. This is because File.delete() fails and subsequently ptoF.renameTo(...)

The rollback should fail in this case by throwing an IOException. I'd fix it myself, but I cannot clone libjitsi currently. Can someone please give this a try?

I'm not sure if this is what you need, and if it solves any issues, so I put it in a pull request:
https://github.com/jitsi/libjitsi/pull/15

Regards,
Boris