Skip to content

Commit

Permalink
adjust dates
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania committed Jan 26, 2021
1 parent 759dee6 commit b54dd0e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Expand Up @@ -2,6 +2,7 @@ use crate::common::jormungandr::ConfigurationBuilder;
use crate::common::startup;
use jormungandr_lib::interfaces::{ActiveSlotCoefficient, KESUpdateSpeed};
use jormungandr_testing_utils::testing::fragments::TransactionGenerator;
use jormungandr_testing_utils::testing::node::time;
use jormungandr_testing_utils::testing::FragmentSender;
use jormungandr_testing_utils::testing::{
BatchFragmentGenerator, FragmentGenerator, FragmentSenderSetup, FragmentStatusProvider,
Expand All @@ -18,7 +19,7 @@ pub fn fragment_load_test() {
&[faucet.clone()],
&[receiver.clone()],
ConfigurationBuilder::new()
.with_slots_per_epoch(60)
.with_slots_per_epoch(20)
.with_consensus_genesis_praos_active_slot_coeff(ActiveSlotCoefficient::MAXIMUM)
.with_slot_duration(4)
.with_epoch_stability_depth(10)
Expand All @@ -30,10 +31,10 @@ pub fn fragment_load_test() {

let configuration = Configuration::duration(
1,
std::time::Duration::from_secs(10),
1000,
std::time::Duration::from_secs(60),
500,
Monitor::Standard(1000),
0,
1_000,
);

let mut request_generator = FragmentGenerator::new(
Expand All @@ -45,7 +46,7 @@ pub fn fragment_load_test() {
FragmentSender::new(
jormungandr.genesis_block_hash(),
jormungandr.fees(),
FragmentSenderSetup::resend_3_times(),
FragmentSenderSetup::no_verify(),
),
);

Expand All @@ -59,6 +60,8 @@ pub fn fragment_load_test() {
let fragment_check = FragmentsCheck::new(jcli, &jormungandr);
fragment_check.wait_until_all_processed().unwrap();

time::wait_for_epoch(1, jormungandr.explorer());

load::start_async(
request_generator,
FragmentStatusProvider::new(jormungandr.to_remote()),
Expand Down Expand Up @@ -90,7 +93,7 @@ pub fn fragment_batch_load_test() {
std::time::Duration::from_secs(60),
1000,
Monitor::Standard(100),
0,
3_000,
);

let mut request_generator = BatchFragmentGenerator::new(
Expand Down
Expand Up @@ -69,7 +69,7 @@ impl<'a> FragmentGenerator<'a> {
}

let vote_plan_for_casting: VotePlan = VotePlanBuilder::new()
.with_vote_start(current_date.shift_slot(18, &time_era).into())
.with_vote_start(current_date.shift_slot(5, &time_era).into())
.with_tally_start(current_date.shift_epoch(5).into())
.with_tally_end(current_date.shift_epoch(6).into())
.build();
Expand All @@ -80,8 +80,8 @@ impl<'a> FragmentGenerator<'a> {
let vote_plans_for_tally: Vec<VotePlan> = iter::from_fn(|| {
Some(
VotePlanBuilder::new()
.with_vote_start(current_date.shift_slot(30, &time_era).into())
.with_tally_start(current_date.shift_slot(31, &time_era).into())
.with_vote_start(current_date.shift_slot(6, &time_era).into())
.with_tally_start(current_date.shift_slot(7, &time_era).into())
.with_tally_end(current_date.shift_epoch(5).into())
.build(),
)
Expand Down

0 comments on commit b54dd0e

Please sign in to comment.