Skip to content

Commit ee8ce73

Browse files
author
Jayant Krishnamurthy
committed
update test
1 parent 98b3fa6 commit ee8ce73

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

program/src/oracle/test_oracle.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,15 @@ Test( oracle, upd_price ) {
534534
cr_assert( sptr->comp_[0].latest_.conf_ == 6L );
535535
cr_assert( sptr->comp_[0].latest_.status_ == PC_STATUS_UNKNOWN );
536536
cr_assert( sptr->comp_[0].latest_.pub_slot_ == 5 );
537-
cr_assert( sptr->agg_.pub_slot_ == 5 );
537+
cr_assert( sptr->agg_.pub_slot_ == 6 );
538+
// Aggregate is still trading because it uses price from previous slot
539+
cr_assert( sptr->agg_.status_ == PC_STATUS_TRADING );
540+
541+
// Crank one more time and aggregate should be unknown
542+
idata.pub_slot_ = 6;
543+
cvar.slot_ = 7;
544+
cr_assert( SUCCESS == dispatch( &prm, acc ) );
545+
cr_assert( sptr->agg_.status_ == PC_STATUS_UNKNOWN );
538546
}
539547

540548
Test( oracle, upd_price_no_fail_on_error ) {

0 commit comments

Comments
 (0)