Failed to sync if gatling-rsync is started after making changes
droidlabour opened this issue · 5 comments
gatling-rsync not able to pick/sync up file changes if it's started after making changes to a file that's being watched and which is already in sync using gatling-rsync mentioned in VagrantFile.
Here's the sequence I'm using
- vagrant up --provider=aws ec2
- Save a file that's being watched
- Start gatling-rsync to watch that file
But it fails to pick up the changes to that file
I've to touch that file in order to make gatling-rsync pick it up.
What you've described is the correct behavior. Gatling picks up changes by watching for creation of files or writes to files while the process is running (much like Vagrant's built-in rsync-auto command.)
Ok, but I think it should be a feature.
At present, you could do vagrant rsync; vagrant gatling-rsync-auto
when you start the gatling rsync to do what you want.
Since this is designed to be a drop-in replacement for Vagrant's rsync-auto
command, I don't want it to work differently out of the box. That said, let me look to see how easy it would be to put together an optional parameter that would do an initial sync before starting up.
When rsync-auto
runs, it does do an initial sync to make sure any changes you've made locally are copied across.
$ vagrant rsync-auto
==> default: Doing an initial rsync...
==> default: Rsyncing folder: /Users/craiga/my-source-code/ => /var/my-source-code
==> default: - Exclude: [".vagrant/", ".git*"]
==> default: Watching: /Users/craiga/my-source-code
Perhaps this is new behaviour?
This has been released to RubyGems as version 0.1.0.
https://rubygems.org/gems/vagrant-gatling-rsync/versions/0.1.0