-
Notifications
You must be signed in to change notification settings - Fork 502
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
services/horizon/internal/test/integration: Run captive core integration tests #3291
services/horizon/internal/test/integration: Run captive core integration tests #3291
Conversation
bd6dccb
to
190b8da
Compare
190b8da
to
75a4876
Compare
# From "SACJC372QBSSKJYTV5A7LWT4NXWHTQO6GHG4QDAVC2XDPX6CNNXFZ4JK" | ||
PUBLIC_KEY="GD5KD2KEZJIGTC63IGW6UMUSMVUVG5IHG64HUTFWCHVZH2N2IBOQN7PS" | ||
ADDRESS="localhost" | ||
QUALITY="MEDIUM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a config file for reingestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to set ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true
to be compatible with the stellar core container which is running the stand alone network.
The quorum set has no significance since we'll be doing reingestion which relies only on the history archives. But stellar-core still requires a non empty quorum set for the configuration file to be valid so I cannot leave the section empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can add another stellarCoreRunnerMode
: stellarCoreRunnerModeOfflineIntegrationTests
that would generate config with the value set. Not urgent and maybe not needed so just sharing an idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartekn another possibility is to have stellarCoreRunner set ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING=true
in the config if the CheckpointFrequency
in the captive core config is equal to 8.
services/horizon/docker/captive-core-reingest-range-integration-tests.cfg
Outdated
Show resolved
Hide resolved
func (i *Test) RestartHorizon() { | ||
i.app.Close() | ||
|
||
// wait for horizon to shut down completely | ||
time.Sleep(time.Second) | ||
|
||
i.startHorizon( | ||
i.horizonConfig.CaptiveCoreBinaryPath, | ||
i.horizonConfig.CaptiveCoreConfigAppendPath, | ||
i.horizonConfig.DatabaseURL, | ||
false, | ||
) | ||
i.waitForHorizon() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks.
"--captive-core-config-append-path", | ||
captiveCoreConfigPath, | ||
"--captive-core-http-port", | ||
"0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is because it clashes with the http port of the other core instance, I think it's worth commenting it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we run two cores at the same time in integration tests? We shouldn't, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nitpicks.
The comment about requiring a checkpointed ledger as the end range of reingestion
(if confirmed) is unrelated to this PR but I think we should create an issue about it.
BTW, huge thanks for getting this done 🥳 I think it's a big milestone for testing captive core! |
PR Checklist
PR Structure
otherwise).
services/friendbot
, orall
ordoc
if the changes are broad or impact manypackages.
Thoroughness
.md
files, etc... affected by this change). Take a look in the
docs
folder for a given service,like this one.
Release planning
needed with deprecations, added features, breaking changes, and DB schema changes.
semver, or if it's mainly a patch change. The PR is targeted at the next
release branch if it's not a patch change.
What
This commit adds a CircleCI job so that the integration tests are run twice (once with captive core enabled and the other time with captive core disabled) for every PR.
The integration tests with captive core enabled are about 1.5 minutes slower than running the tests with captive core disabled.
Known limitations
[N/A]