Skip to content

Conversation

lordofthejars
Copy link
Contributor

No description provided.


if (isAnnotated(annotatedElement, HoverflyValidate.class)) {
final HoverflyValidate hoverflyValidate = annotatedElement.getAnnotation(HoverflyValidate.class);
hoverfly.assertThatNoDiffIsReported(hoverflyValidate.reset());
Copy link
Member

Choose a reason for hiding this comment

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

If the assertion is failed, it will not proceed to shut down hoverfly. I think the assertion should be wrap in the following try... finally... block as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AfterAll callback is always called, even in case of exception, so Hoverfly is closed there.

Copy link
Member

Choose a reason for hiding this comment

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

My concern was that hoverfly.assertThatNoDiffIsReported in the AfterAll callback throws an AssertionError which is not in the try-finally block. So it stops the execution of the succeeding code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh right sorry I just fixed my eyes in one part

Copy link
Member

Choose a reason for hiding this comment

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

no worries :)

@lordofthejars
Copy link
Contributor Author

@tommysitu I think everything is addressed now.

@lordofthejars
Copy link
Contributor Author

@tommysitu Now :)

@tommysitu
Copy link
Member

Looks good!

@tommysitu tommysitu merged commit 3b96dee into SpectoLabs:master Mar 18, 2019
@lordofthejars lordofthejars deleted the issue-206 branch March 18, 2019 16:50
@lordofthejars
Copy link
Contributor Author

Any plan to release soon? I'd like to write about it on my next blog post.

@tommysitu
Copy link
Member

tommysitu commented Mar 18, 2019

Nothing else is pending, we can do a release tomorrow. Just being curious, what's your next blog about?

@lordofthejars
Copy link
Contributor Author

lordofthejars commented Mar 18, 2019

About hoverfly/service virtualization and java

@tommysitu
Copy link
Member

👍 Look forward to it!

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.

2 participants