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

FLK-1037 - Changes made for Lab Exercises 3 and 4 #2

Open
wants to merge 2 commits into
base: release-1.15
Choose a base branch
from

Conversation

ness-marichamyramachandran
Copy link
Owner

No description provided.

Copy link

@pavel-hp pavel-hp left a comment

Choose a reason for hiding this comment

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

Pls see my comments

@@ -41,6 +43,9 @@ public class LongRidesUnitTest extends LongRidesTestBase {

private KeyedOneInputStreamOperatorTestHarness<Long, TaxiRide, Long> harness;

@Rule
public ExpectedException exceptionRule = ExpectedException.none();

Choose a reason for hiding this comment

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

  1. What is it? Purpose.
  2. Why it's public?

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is to check if the expected exception is thrown with a expected message. It doesn't need to be public. should be private

Copy link
Owner Author

Choose a reason for hiding this comment

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

Rewritten the Junit to handle exception using Junit-5

@@ -110,6 +115,16 @@ public void shouldAlertWithStartFirst() throws Exception {
assertThat(resultingRideId()).isEqualTo(rideStarted.rideId);
}

@Test
public void shouldThrowExceptionWhenIsStartFalse() throws Exception {
exceptionRule.expect(LongRidesException.class);

Choose a reason for hiding this comment

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

Sorry, what we are checking here?
As I see you introduced variable

    @Rule
    public ExpectedException exceptionRule = ExpectedException.none();

a now just do this, what is the reason of it?

Copy link
Owner Author

Choose a reason for hiding this comment

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

checking if the method is throwing an exception when startTime is not available in the end event

Choose a reason for hiding this comment

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

Copy link
Owner Author

Choose a reason for hiding this comment

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

Rewritten the Junit to handle exception using Junit-5

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