BufferedStore Testing Semantics

A BufferedStore is a store that initially writes a buffer and eventually transports data to a destination. The fact that the store is Buffered is an implementation detail and interaction with the store should be transparent to the user.

Reading from a BufferedStore

Each read can be thought of as a query of the form do you have any X?

  • describe 1 is asking: do you have any data where record is 1?
  • fetch "count", 1 is asking: do you have any data where key is count and record is 1?
  • verify "count", 1,1 is aksing: do you have any data where key is count, value is 1 and record is 1
  • etc

Each component can answer that question in 1 of 3 ways:

  • Yes
  • No, because it was removed
  • No, because it was never added

Here is the matrix for how component responses should form an overall BufferedStore response:

Destination ResponseBuffer ResponseOverall Response
YesYesYes
YesNo, because it was removed 
YesNo, because it was never added 
No, removedYes 
No, removedNo, because it was removed 
No, removedNo, because it was never added 
No, never hadYes 
No, never hadNo, because it was removed 
No, never hadNo, because it was never added