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

Fix NPE when GCE region is empty #19176

Merged

Conversation

dadoonet
Copy link
Member

When GCE region is empty we get back from the API something like:

{
  "id": "dummy"
}

instead of:

{
  "id": "dummy",
  "items":[ ]
}

This generates a NPE when we aggregate all the lists into a single one.

Closes #16967.

When GCE region is empty we get back from the API something like:

```
{
  "id": "dummy"
}
```

instead of:

```
{
  "id": "dummy",
  "items":[ ]
}
```

This generates a NPE when we aggregate all the lists into a single one.

Closes elastic#16967.
@@ -254,4 +254,17 @@ public void testIllegalSettingsMissingZone() {
assertThat(expected.getMessage(), containsString("one or more gce discovery settings are missing."));
}
}

/**
* For issue https://github.com/elastic/elasticsearch/issues/16967
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a small note on what this test does? link is good but description is better.

Same thing with method name: testNoRegionReturnsEmptyList or something like that

@tlrx
Copy link
Member

tlrx commented Jun 30, 2016

Left minor comment, other than that LGTM

@dadoonet dadoonet merged commit f9d22b3 into elastic:master Jun 30, 2016
@dadoonet dadoonet deleted the pr/16967-npe-gce-empty-region-master branch June 30, 2016 09:45
@clintongormley clintongormley added :Distributed Coordination/Discovery-Plugins Anything related to our integration plugins with EC2, GCP and Azure and removed :Plugin Discovery GCE labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Coordination/Discovery-Plugins Anything related to our integration plugins with EC2, GCP and Azure v5.0.0-alpha5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants