@@ -97,12 +97,12 @@ fn test_reader() {
9797 let mut conn = Conn :: connect ( & mut c) . expect ( "Couldn't open DB." ) ;
9898 {
9999 let db_tx = c. transaction ( ) . expect ( "db tx" ) ;
100- // Don't inspect the bootstrap transaction, but we'd like to see it's there .
100+ // Ensure that the first ( bootstrap) transaction is skipped over .
101101 let mut receiver = TxCountingReceiver :: new ( ) ;
102102 assert_eq ! ( false , receiver. is_done) ;
103103 Processor :: process ( & db_tx, None , & mut receiver) . expect ( "processor" ) ;
104104 assert_eq ! ( true , receiver. is_done) ;
105- assert_eq ! ( 1 , receiver. tx_count) ;
105+ assert_eq ! ( 0 , receiver. tx_count) ;
106106 }
107107
108108 let ids = conn. transact ( & mut c, r#"[
@@ -112,7 +112,7 @@ fn test_reader() {
112112 ]"# ) . expect ( "successful transaction" ) . tempids ;
113113 let numba_entity_id = ids. get ( "s" ) . unwrap ( ) ;
114114
115- let mut bootstrap_tx = None ;
115+ let first_tx ;
116116 {
117117 let db_tx = c. transaction ( ) . expect ( "db tx" ) ;
118118 // Expect to see one more transaction of four parts (one for tx datom itself).
@@ -121,10 +121,10 @@ fn test_reader() {
121121
122122 println ! ( "{:#?}" , receiver) ;
123123
124- assert_eq ! ( 2 , receiver. txes. keys( ) . count( ) ) ;
125- assert_tx_datoms_count ( & receiver, 1 , 4 ) ;
124+ assert_eq ! ( 1 , receiver. txes. keys( ) . count( ) ) ;
125+ assert_tx_datoms_count ( & receiver, 0 , 4 ) ;
126126
127- bootstrap_tx = Some ( * receiver. txes . keys ( ) . nth ( 0 ) . expect ( "bootstrap tx" ) ) ;
127+ first_tx = Some ( * receiver. txes . keys ( ) . nth ( 0 ) . expect ( "first tx" ) ) ;
128128 }
129129
130130 let ids = conn. transact ( & mut c, r#"[
@@ -138,14 +138,14 @@ fn test_reader() {
138138 // Expect to see a single two part transaction
139139 let mut receiver = TestingReceiver :: new ( ) ;
140140
141- // Note that we're asking for the bootstrap tx to be skipped by the processor.
142- Processor :: process ( & db_tx, bootstrap_tx , & mut receiver) . expect ( "processor" ) ;
141+ // Note that we're asking for the first transacted tx to be skipped by the processor.
142+ Processor :: process ( & db_tx, first_tx , & mut receiver) . expect ( "processor" ) ;
143143
144- assert_eq ! ( 2 , receiver. txes. keys( ) . count( ) ) ;
145- assert_tx_datoms_count ( & receiver, 1 , 2 ) ;
144+ assert_eq ! ( 1 , receiver. txes. keys( ) . count( ) ) ;
145+ assert_tx_datoms_count ( & receiver, 0 , 2 ) ;
146146
147147 // Inspect the transaction part.
148- let tx_id = receiver. txes . keys ( ) . nth ( 1 ) . expect ( "tx" ) ;
148+ let tx_id = receiver. txes . keys ( ) . nth ( 0 ) . expect ( "tx" ) ;
149149 let datoms = receiver. txes . get ( tx_id) . expect ( "datoms" ) ;
150150 let part = & datoms[ 0 ] ;
151151
0 commit comments