Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add random folder option #18

Merged
merged 2 commits into from Aug 19, 2016

Conversation

cottsak
Copy link
Contributor

@cottsak cottsak commented Aug 18, 2016

adding option to use a different folder each time to absolutely ensure test isolation in debugging/dev scenarios

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Aug 18, 2016

see _dataDirectoryWithPort. it already uses everythime a different directory. can you explain the reason for the change?

@cottsak
Copy link
Contributor Author

cottsak commented Aug 19, 2016

The folder is only unique to the port, which is not enough. When I'm building out my test (prior to it passing and failing all the way to the end of the using block which Dispose()s the runner), I run the test, in part, many many times. On these runs, the in-memory mongo process finds the same available port, meaning it's the same folder on my disk every time. Then, as a result of #17 my data directory is not being cleaned up. So my workaround was to supply a random path (suffux) for each run and then i could be assured of a consistent test environment. This PR simply formalises that work-around.

@JohannesHoppe
Copy link
Member

Okay. Makes sence. Then I suggest to remove the param and make Guid-based-directory the new default behavior. I was initially expecting that port-based-directory gives enough isolation. When done, I’m happily accept the commit.

@cottsak
Copy link
Contributor Author

cottsak commented Aug 19, 2016

@JohannesHoppe Ok. Updated. Sorry about the whitespace.

@JohannesHoppe
Copy link
Member

LGTM!

@cottsak
Copy link
Contributor Author

cottsak commented Aug 20, 2016

Thanks. So when do we see a new package version?

@JohannesHoppe
Copy link
Member

Any time. Do you need it urgently or can we wait for #17 and #19?

@cottsak
Copy link
Contributor Author

cottsak commented Aug 21, 2016

I should show you how to set up a free AppVeyor account to continuously push to nuget. Provided the process works for the tests, you wouldn't have to do anything then.

On 21 Aug 2016, 16:22 +0800, Johannes Hoppe notifications@github.com, wrote:

Any time. Do you need it urgently or can we wait for #17 (#17) and #19 (#19)?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (#18 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAwr1OsG3HkAEygznGaG1vqIqGEmsvMIks5qiArCgaJpZM4JnMbm).

@JohannesHoppe
Copy link
Member

I guees it works similar to Travis-CI? Anyhow, I signed up there and already added Mongo2Go to the projects. What's next?

In a perfect world:

  • master goes continuously to MyGet
  • tagged commits go to Nuget

JohannesHoppe added a commit that referenced this pull request Aug 22, 2016
JohannesHoppe added a commit that referenced this pull request Aug 22, 2016
@cottsak
Copy link
Contributor Author

cottsak commented Aug 23, 2016

@JohannesHoppe Yes, same product category as Travis.

You can take a look a http://www.hanselman.com/blog/AppVeyorAGoodContinuousIntegrationSystemIsAJoyToBehold.aspx if you like, but it's probably easier for you just to get in there are figure it out.

You essentially need to:

  • Create a new project and connect it to your github repo
  • On the General page, specify a Build version format and then turn on AssemblyInfo patching - I find this to be the easiest way.
  • On the Build page you may need to Package NuGet projects and add nuget restore to the Before build script (CMD)
  • On the Deployment page choose NuGet from the provider list and get your api key in there. You will also want to set Deploy from branch to master otherwise all PRs will have packages deployed too, which you don't want.
  • Jump to the Badges page and copy the image link for your build status page and put it into your readme (like this).
  • Make a commit to include your AssemblyInfo changes after saving the above and watch the build trigger off and see what happens.

I may have forgot one or two small things, but pretty much that's it. The only tricky thing will be whether AppVeyor runs your integration tests because of the child process. Give it a go- it may 'just work'. Ping me if not and we can work through some things I've tried before for integration tests.

@JohannesHoppe
Copy link
Member

Wow, that's very much work to setup everything. 😞

Right now I click:

package_create.cmd
package_push.cmd

@cottsak
Copy link
Contributor Author

cottsak commented Aug 24, 2016

@JohannesHoppe yeh but you have to push version number changes and click those scripts every time. Once this is done once, that's it!

I guess you just have to figure out how valuable your time is. 😛

@JohannesHoppe
Copy link
Member

Time is short! 😢

If I would make you admin of my AppVeyor account, could you set up this for me/us?
I would be also fine to migrate Mongo2Go to github.com/Mongo2Go/Mongo2Go to make it more community-driven. What do you prefer?

@cottsak
Copy link
Contributor Author

cottsak commented Aug 24, 2016

@JohannesHoppe I emailed you mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants