Skip to content

Commit 7b94b15

Browse files
committed
test: drop then create
1 parent 0a0f859 commit 7b94b15

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

test/integration/change-streams/change_stream.test.ts

+20-8
Original file line numberDiff line numberDiff line change
@@ -1745,11 +1745,23 @@ describe('Change Streams', function () {
17451745
})
17461746
.createEntities([
17471747
{ client: { id: 'client0' } },
1748-
{ database: { id: 'database0', client: 'client0', databaseName: 'changeStreamDocShape' } },
1749-
{ collection: { id: 'collection0', database: 'database0', collectionName: 'collection0' } },
17501748

17511749
// transaction test
17521750
{ session: { id: 'session0', client: 'client0' } },
1751+
{
1752+
database: {
1753+
id: 'changeStreamDocShape',
1754+
client: 'client0',
1755+
databaseName: 'changeStreamDocShape'
1756+
}
1757+
},
1758+
{
1759+
collection: {
1760+
id: 'collection0',
1761+
database: 'changeStreamDocShape',
1762+
collectionName: 'collection0'
1763+
}
1764+
},
17531765

17541766
// rename test
17551767
{ database: { id: 'admin', databaseName: 'admin', client: 'client0' } },
@@ -1839,15 +1851,15 @@ describe('Change Streams', function () {
18391851
.test(
18401852
TestBuilder.it('change stream event inside transaction')
18411853
.operation({
1842-
object: 'database0',
1843-
name: 'createCollection',
1844-
arguments: { collection: 'collection0' },
1854+
object: 'changeStreamDocShape',
1855+
name: 'runCommand',
1856+
arguments: { command: { dropDatabase: 1 } },
18451857
ignoreResultAndError: true
18461858
})
18471859
.operation({
1848-
object: 'database0',
1849-
name: 'runCommand',
1850-
arguments: { command: { dropDatabase: 1 } },
1860+
object: 'changeStreamDocShape',
1861+
name: 'createCollection',
1862+
arguments: { collection: 'collection0' },
18511863
ignoreResultAndError: true
18521864
})
18531865
.operation({

0 commit comments

Comments
 (0)