func printOnFailure(t *testing.T, lru *TieredLRUCache) {
	if t.Failed() {
		printMockLogger(t, lru.logger.(*mock.Logger))
	}
	if str := recover(); str != nil {
		printLru(lru)
		printMockLogger(t, lru.logger.(*mock.Logger))
		panic(utils.WrapErrorWithStack(str.(error)).Error())
	}
}
func (pw *partWriter) Close() error {
	if pw.currentPos-pw.startPos != pw.length {
		return utils.WrapErrorWithStack(&partWriterShortWrite{
			expected: pw.length,
			actual:   pw.currentPos - pw.startPos,
		})
	}
	if pw.buf == nil {
		return nil
	}
	return pw.flushBuffer()
}