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

[Testing, Tooling] refactor: in-memory network usage #285

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Dec 19, 2023

Summary

Human Summary

Refactors usage of in-memory network in tests to utilize updated in-memory network testutils.

Issue

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify)

Testing

  • Run all unit tests: make go_develop_and_test
  • Run E2E tests locally: make test_e2e
  • Run E2E tests on DevNet: Add the devnet-test-e2e label to the PR. This is VERY expensive, only do it after all the reviews are complete.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@bryanchriswhite bryanchriswhite added testing Test (or test utils) additions, fixes, improvements or other tooling Tooling - CLI, scripts, helpers, off-chain, etc... labels Dec 19, 2023
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Dec 19, 2023
@bryanchriswhite bryanchriswhite self-assigned this Dec 19, 2023
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch 3 times, most recently from 45d83a6 to d6ae216 Compare December 21, 2023 18:40
@bryanchriswhite bryanchriswhite changed the base branch from issues/141/refactor/supplier-errors to issues/141/prep/in-memory-network December 21, 2023 18:47
@bryanchriswhite bryanchriswhite changed the base branch from issues/141/prep/in-memory-network to issues/141/feat/in-memory-network December 21, 2023 18:48
@bryanchriswhite bryanchriswhite changed the title [Testing, Tooling] refactor: in-memory network [Testing, Tooling] refactor: in-memory network usage Dec 21, 2023
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch 2 times, most recently from efab202 to 12f1041 Compare December 21, 2023 21:09
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch 2 times, most recently from 438c8a0 to 40df084 Compare December 22, 2023 14:12
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch 2 times, most recently from c8f623d to a679165 Compare January 2, 2024 08:45
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch 2 times, most recently from 92fad70 to 8bad7dd Compare January 2, 2024 12:52
@bryanchriswhite bryanchriswhite force-pushed the issues/141/refactor/in-memory-network branch from 8bad7dd to 2b1158a Compare January 2, 2024 12:58
@bryanchriswhite bryanchriswhite marked this pull request as ready for review January 2, 2024 13:26
…ctor/in-memory-network

* issues/141/feat/in-memory-network:
  fixup! fix: linter errors
…ctor/in-memory-network

* issues/141/feat/in-memory-network:
  chore: fix comment typo
  chore: post-merge refactor
  chore: fix comment
  chore: add #GetConfig()
  chore: rename InMemoryCosmosNetwork to InMemoryNetwork
  chore: update comment
  chore: review feedback improvements
  chore: add TODOs
  [Docs] Load Test #1 - Plan (#286)
  [Bug] Fix observable error logging (#298)
  [docs] Relayminer config documentation (#288)
  [Configs] Add foundation for RelayMiner operation configs. (#284)
  [SMT] Update to use SMT v0.8.2 (#297)
  [EventsReplayClient] Fix Replay Client Bugs (#267)
Copy link
Contributor

@h5law h5law left a comment

Choose a reason for hiding this comment

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

One minor comment on naming confusion as we use an SDK and provide an SDK

Otherwise great refactoring!

Love the new pattern, this is truly 🔥:

memnet := sessionnet.NewInMemoryNetworkWithSessions(
		t, &network.InMemoryNetworkConfig{
			NumSuppliers:            2,
			AppSupplierPairingRatio: appSupplierPairingRatio,
		},
	)
memnet.Start(ctx, t)

net := memnet.GetNetwork(t)

testutil/network/network.go Show resolved Hide resolved
testutil/testkeyring/gen_accounts/gen.go Show resolved Hide resolved
@bryanchriswhite bryanchriswhite merged commit 469a83f into issues/141/feat/in-memory-network Jan 9, 2024
4 of 5 checks passed
@bryanchriswhite
Copy link
Contributor Author

bryanchriswhite commented Jan 9, 2024

Unintentionally closed, will re-open as a new PR.

UPDATE:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Test (or test utils) additions, fixes, improvements or other tooling Tooling - CLI, scripts, helpers, off-chain, etc...
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants