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

Running ES service causes issues #11

Open
kendaleiv opened this issue Jun 27, 2018 · 6 comments
Open

Running ES service causes issues #11

kendaleiv opened this issue Jun 27, 2018 · 6 comments

Comments

@kendaleiv
Copy link

On Windows 10 with the elasticsearch-service-x64 version 6.2.4 running I'm unable to get Elastic.Xunit.ExampleMinimal to work as expected. However, with the service stopped it works great.

I'm guessing this is related:

Caused by: org.elasticsearch.http.BindHttpException: Failed to bind to [9200]
@Mpdreamz
Copy link
Member

Mpdreamz commented Jul 9, 2018

Thanks for raising this @kendaleiv

By default the nodes Elastic.Xunit spin up run on 9200 like any elasticsearch node. This can be changed however e.g if we alter the constructor in the Elastic.Xunit.ExampleMinimal MyTestCluster cluster.

		public MyTestCluster() : base(new XunitClusterConfiguration("6.2.0")
		{
			StartingPortNumber = 9201
		})
		{
		}

I'm inclined to keep it this way rather than trying to do something clever, @codebrain @russcam thoughts?

@codebrain
Copy link
Contributor

I would be inclined to leave it the way it currently is, otherwise we'd have to start inspecting the local environment to determine available ports and that seems like overkill at this stage.

@kendaleiv
Copy link
Author

@Mpdreamz Setting ClusterConfiguration.StartingPortNumber = 9201; doesn't seem to work and port 9200 is still used. Any ideas?

@kendaleiv
Copy link
Author

However, setting it like

public MyTestCluster() : base(new XunitClusterConfiguration("6.2.0") { StartingPortNumber = 9251 })

does work.

@Mpdreamz
Copy link
Member

This is somewhat expected as everything materializes in the constructor chaining.

It oughta be a constructor argument really :)

Are you already using any of the code in this repository @kendaleiv ?

@kendaleiv
Copy link
Author

Yeah, we moved to this from https://github.com/poulfoged/Elasticsearch-Inside. I understand this project is currently prerelease. 😃

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

No branches or pull requests

3 participants