Skip to content
This repository was archived by the owner on Apr 4, 2021. It is now read-only.

Conversation

@pravin-dsilva
Copy link

The test fails with

java.lang.AssertionError: expected:<1> but was:<null>
	at org.testng.Assert.fail(Assert.java:89)
	at org.testng.Assert.failNotEquals(Assert.java:489)
	at org.testng.Assert.assertEquals(Assert.java:118)
	at org.testng.Assert.assertEquals(Assert.java:160)
	at org.apache.falcon.notification.service.SchedulerServiceTest.testDeRegistration(SchedulerServiceTest.java:274)

The test passed by increasing the timeout.

Copy link

@pallavi-rao pallavi-rao left a comment

Choose a reason for hiding this comment

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

@pravin-dsilva, thanks for picking this up. A better solution for such async methods, would be to have a simple method that does sleep-check loop till a given timeout. Just a sleep is not reliable as it would take different times in different environments. Something on the lines of FalconUnitTestBase.waitFor.

Having said that, your change does not really impact the test adversely, so I can merge this now and you can implement a proper solution in a separate JIRA. Let me know how you would like to proceed.

@Prajyot-Parab
Copy link

@pallavi-rao Have raised a new PR - #416 with waitFor implementation to fix the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants