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

When creating resources within an 'init' stage, can break txNumber test #570

Closed
nklincoln opened this issue Sep 3, 2019 · 3 comments
Closed
Labels
bug Something isn't working component/core Related to the core code-base
Milestone

Comments

@nklincoln
Copy link
Contributor

If you create a series of assets within the init phase of a benchmark callback, the the txCount is incremented since deep in the code a callback that increments the txCount is called.

If you are relying on a test that runs for a certain number of transactions, then all of these transactions will count for the test transactions ... this is bad and we should avoid it.

Context

Running a benchmark with a txNumber specification resulted in no test transactions being issued.

Expected Behavior

All txNumber transactions are run

Actual Behavior

Any transactions run in the init phase count towards test transactions

Possible Fix

Add a boolean flag (testPhase, default false?) to the invokeSmartContract that is passed though and acted on conditionally when triggering the callback that increments the txCount

@nklincoln nklincoln added the bug Something isn't working label Sep 3, 2019
@aklenik aklenik added the component/core Related to the core code-base label Sep 11, 2019
@aklenik aklenik added this to the v0.2.0 milestone Sep 11, 2019
@nklincoln
Copy link
Contributor Author

There is an existing countQueryAsLoad option that is used in query operations - proposal is to do similar with a countTransactionAsLoad option (or indeed make a generic countAsLoad) so that the way to perform a "loaded txn" is the same for users

@aklenik
Copy link
Contributor

aklenik commented Sep 30, 2019

@nklincoln How about using az init round for populating the backend DLT? It's much cleaner, and you get every feature the rounds can use.
(Although ignoring the round in the report could be useful in this case.)

@aklenik aklenik modified the milestones: v0.2.0, v0.3.0 Oct 9, 2019
@nklincoln
Copy link
Contributor Author

fixed in #682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/core Related to the core code-base
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants