Compare commits
1
Commits
c0dd1d140f
..
next
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f9d624d74 |
@@ -155,11 +155,12 @@ func TestService_Get_ReturnsByItsDeadlineWhileTheDatabaseIsBusy(t *testing.T) {
|
|||||||
waitForCounters(t, svc.cache, cacheStatsCounters{missCount: 1})
|
waitForCounters(t, svc.cache, cacheStatsCounters{missCount: 1})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestIncrementStats_ManyCountsPastTheirDeadlineLeaveOneWriteWaiting holds the
|
// TestIncrementStats_ManyCountsLeaveOneWriteWaiting holds the database's one
|
||||||
// database's one connection while many misses are counted past their
|
// connection while many misses are added to the pending counts, which the
|
||||||
// deadline. At most one write may then wait for the connection, and every
|
// goroutine StartPendingCountWrites starts writes to the database. At most one
|
||||||
// miss must reach the database once it is free.
|
// write may then wait for the connection, and every miss must reach the
|
||||||
func TestIncrementStats_ManyCountsPastTheirDeadlineLeaveOneWriteWaiting(t *testing.T) {
|
// database once it is free.
|
||||||
|
func TestIncrementStats_ManyCountsLeaveOneWriteWaiting(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
cache, _ := newEvictionTestCache(t, 1<<30)
|
cache, _ := newEvictionTestCache(t, 1<<30)
|
||||||
@@ -194,9 +195,9 @@ func TestIncrementStats_ManyCountsPastTheirDeadlineLeaveOneWriteWaiting(t *testi
|
|||||||
waitForCounters(t, cache, cacheStatsCounters{missCount: misses})
|
waitForCounters(t, cache, cacheStatsCounters{missCount: misses})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestStats_IncludesPendingCounts counts hits and misses whose writes miss
|
// TestStats_IncludesPendingCounts adds hits and misses to the pending counts,
|
||||||
// their deadline, and checks that Stats adds them to the database's counts
|
// with no goroutine started to write them, and checks that Stats adds them to
|
||||||
// before they are written.
|
// the database's counts before they are written.
|
||||||
func TestStats_IncludesPendingCounts(t *testing.T) {
|
func TestStats_IncludesPendingCounts(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user