File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Async/NHSpecificTest/GH3609 Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public async Task QueryWithAnyAsync()
68
68
var orderCount = await ( session . Query < LineItem > ( ) . CountAsync ( x => validOrders . Any ( y => y == x . Order ) ) ) ;
69
69
70
70
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
71
+ await ( transaction . CommitAsync ( ) ) ;
71
72
}
72
73
73
74
[ Test ]
@@ -82,6 +83,7 @@ public async Task QueryWithAnyOnCleanLinesAsync()
82
83
var orderCount = await ( session . Query < CleanLineItem > ( ) . CountAsync ( x => validOrders . Any ( y => y == x . Order ) ) ) ;
83
84
84
85
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
86
+ await ( transaction . CommitAsync ( ) ) ;
85
87
}
86
88
87
89
[ Test ]
@@ -94,6 +96,7 @@ public async Task QueryWithContainsAsync()
94
96
var orderCount = await ( session . Query < LineItem > ( ) . CountAsync ( x => validOrders . Contains ( x . Order ) ) ) ;
95
97
96
98
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
99
+ await ( transaction . CommitAsync ( ) ) ;
97
100
}
98
101
99
102
[ Test ]
@@ -105,6 +108,7 @@ public async Task SimpleQueryForDataWhichWasInsertedViaAdoShouldProvideExpectedR
105
108
// This style of equivalent query does not exhibit the problem. This test passes no matter which NH version.
106
109
var lineItem = await ( session . Query < LineItem > ( ) . FirstOrDefaultAsync ( x => x . Order . CreatedDate > new DateTime ( 2024 , 9 , 10 ) ) ) ;
107
110
Assert . That ( lineItem , Is . Not . Null ) ;
111
+ await ( transaction . CommitAsync ( ) ) ;
108
112
}
109
113
}
110
114
}
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ public void QueryWithAny()
56
56
var orderCount = session . Query < LineItem > ( ) . Count ( x => validOrders . Any ( y => y == x . Order ) ) ;
57
57
58
58
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
59
+ transaction . Commit ( ) ;
59
60
}
60
61
61
62
[ Test ]
@@ -70,6 +71,7 @@ public void QueryWithAnyOnCleanLines()
70
71
var orderCount = session . Query < CleanLineItem > ( ) . Count ( x => validOrders . Any ( y => y == x . Order ) ) ;
71
72
72
73
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
74
+ transaction . Commit ( ) ;
73
75
}
74
76
75
77
[ Test ]
@@ -82,6 +84,7 @@ public void QueryWithContains()
82
84
var orderCount = session . Query < LineItem > ( ) . Count ( x => validOrders . Contains ( x . Order ) ) ;
83
85
84
86
Assert . That ( orderCount , Is . EqualTo ( 1 ) ) ;
87
+ transaction . Commit ( ) ;
85
88
}
86
89
87
90
[ Test ]
@@ -93,6 +96,7 @@ public void SimpleQueryForDataWhichWasInsertedViaAdoShouldProvideExpectedResults
93
96
// This style of equivalent query does not exhibit the problem. This test passes no matter which NH version.
94
97
var lineItem = session . Query < LineItem > ( ) . FirstOrDefault ( x => x . Order . CreatedDate > new DateTime ( 2024 , 9 , 10 ) ) ;
95
98
Assert . That ( lineItem , Is . Not . Null ) ;
99
+ transaction . Commit ( ) ;
96
100
}
97
101
}
98
102
}
You can’t perform that action at this time.
0 commit comments