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