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

Correct tests after fabric8 upgrade #1374

Merged
merged 82 commits into from
Jun 25, 2023
Merged

Conversation

wind57
Copy link
Contributor

@wind57 wind57 commented Jun 22, 2023

No description provided.

wind57 and others added 30 commits December 4, 2021 07:59
@@ -57,7 +57,7 @@ void locateShouldThrowExceptionOnFailureWhenFailFastIsEnabled() {
configMapConfigProperties, new KubernetesNamespaceProvider(new MockEnvironment()));

assertThatThrownBy(() -> locator.locate(new MockEnvironment())).isInstanceOf(IllegalStateException.class)
.hasMessageContaining("api/v1/namespaces/default/configmaps. Message: Not Found.");
Copy link
Contributor Author

@wind57 wind57 Jun 22, 2023

Choose a reason for hiding this comment

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

this has caught my eye while looking at the PR that you created Ryan with fabric8 upgrade. I am not very sure what was going on and where, but "Not Found" message should have not happened, as we have a stub with "Internal Server Error" right before that, that we assert for it, on purpose.

Copy link
Contributor Author

@wind57 wind57 Jun 22, 2023

Choose a reason for hiding this comment

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

I think that the problem was in our tests all this time, but with the new upgrade they all "came to life". Most probably fabric8 tightened the internal implementation. The missing bit for me right now is how this passes locally...

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah i thought they had changed the message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I remember facing the same issue a while ago, that's why it caught my eye

@wind57 wind57 changed the title Slight correct tests after fabric8 upgrade Correct tests after fabric8 upgrade Jun 22, 2023
@@ -48,7 +48,7 @@ void locateShouldThrowExceptionOnFailureWhenFailFastIsEnabled() {
String namespace = "default";
String path = "/api/v1/namespaces/default/configmaps";

mockServer.expect().withPath(path).andReturn(500, "Internal Server Error").once();
mockServer.expect().withPath(path).andReturn(500, "Internal Server Error").always();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

imho, it's a bug somewhere in fabric8 that once does not work here, for the time being always fixes it, though I might dig deeper and raise an issue in fabric8

@wind57 wind57 marked this pull request as ready for review June 24, 2023 19:57
@wind57 wind57 requested a review from ryanjbaxter June 24, 2023 19:57
@ryanjbaxter ryanjbaxter added this to the 3.1.0-M1 milestone Jun 25, 2023
@ryanjbaxter ryanjbaxter merged commit 27186ec into spring-cloud:main Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants