Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Unroll
def '#wc should return getlasterror document #commandDocument'() {
expect:
wc.asDocument() == commandDocument;
where:
wc | commandDocument
WriteConcern.UNACKNOWLEDGED | ['getlasterror': 0]
WriteConcern.ACKNOWLEDGED | ['getlasterror': 1]
WriteConcern.REPLICA_ACKNOWLEDGED | ['getlasterror': 1, 'w': 2]
WriteConcern.JOURNALED | ['getlasterror': 1, 'j': true]
WriteConcern.FSYNCED | ['getlasterror': 1, 'fsync': true]
new WriteConcern('majority') | ['getlasterror': 1, 'w': 'majority']
new WriteConcern(1, 100) | ['getlasterror': 1, 'wtimeout': 100]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment