         fs.ensureDirSync folders[0]
         fs.ensureDirSync folders[1]
         fs.unlink logs[2], ->
-            makeOperations 1000, done
+            makeOperations 2000, done
 
     it 'registers two devices', (done) ->
         registerDevice 0, (err) ->



# In this test, we launch 2 cozy-desktops in two directories, and make them
# synchronize via a central cozy instance. During ~20 seconds, we do some
# operations in both directory (like creating files, or moving folders).
# After that, we wait 10 seconds and we compare the 2 directories. They should
# be identical: same files and folders.
describe 'Property based testing', ->
    @slow 1000

    return mkdirOperation() if dirs.length is 1
    root = if Math.random() > 0.5 then folders[0] else folders[1]
    src = faker.random.arrayElement dirs[1..]
    parent = path.dirname src
    dst = path.join parent, faker.company.bs()
    dirs.push dst
    op =
        move: 'dir'
        src: path.join root, src
        dst: path.join root, dst
    return op

# Create a random copy dir operation
copyDirOperation = ->
    return mkdirOperation() if dirs.length is 1
    root = if Math.random() > 0.5 then folders[0] else folders[1]
    src = faker.random.arrayElement dirs[1..]
    parent = path.dirname src
    dst = path.join parent, faker.company.bs()
    dirs.push dst
    op =
        copy: 'dir'
        src: path.join root, src
        dst: path.join root, dst
    return op
