Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Test: Updated TransactionTestUtils, its usage, and javadoc #1363

Merged
merged 7 commits into from
May 7, 2019

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Feb 27, 2019

Description

Changes to unit tests required for the added unit tests in #1091

Type of change

  • Enhancement (a non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@kwek20 kwek20 changed the title Updated TransactionTestUtils, its usage, and javadoc Test: Updated TransactionTestUtils, its usage, and javadoc Feb 27, 2019
@kwek20 kwek20 mentioned this pull request Feb 27, 2019
6 tasks
@jakubcech jakubcech requested a review from karimodm March 4, 2019 13:27
@@ -91,7 +91,7 @@ public void requestTransaction(Hash hash, boolean milestone) throws Exception {
*
* It used when the queue capacity is reached, and new transactions would be dropped as a result.
*/
// @VisibleForTesting
//Package Private For Testing
Copy link
Contributor

Choose a reason for hiding this comment

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

default method visibility: package level.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@karimodm What do you mean? If you're talking about the message, pretty sure @GalRogozinski told me to name it like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah talked with Gal, were going with the annotation now!

src/test/java/com/iota/iri/TransactionTestUtils.java Outdated Show resolved Hide resolved
src/test/java/com/iota/iri/TransactionTestUtils.java Outdated Show resolved Hide resolved
@karimodm
Copy link
Contributor

karimodm commented Mar 5, 2019

Looks good, but some more fixes might be good since we are at it.

@jakubcech jakubcech added this to the Udaipur milestone Apr 1, 2019
Copy link
Contributor

@karimodm karimodm left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the changes!

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

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

Can you please don't name the methods with "random"?
The reason is that randomness is the root of all evil in tests.

Currently the seed we are using is not really random:
private static Random seed = new Random(1);

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

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

Great. This will be merged once TIAB is up and running again

@GalRogozinski GalRogozinski merged commit ad2ec19 into iotaledger:dev May 7, 2019
@jakubcech jakubcech mentioned this pull request May 27, 2019
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.

4 participants