Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии
This commit is contained in:
@@ -146,11 +146,8 @@ func TestLogoutRevokesOnlyTheCurrentToken(t *testing.T) {
|
||||
ts.expect(ts.do(http.MethodGet, "/api/v1/users/me", other.Token, nil, nil), http.StatusOK, "")
|
||||
}
|
||||
|
||||
// The expiry is an absolute time written by the application and enforced by
|
||||
// Valkey's clock. Here the test runs on the Windows host and Valkey in the
|
||||
// Docker VM, whose clock lags by a fraction of a second, so the test waits
|
||||
// for the 401 with a tolerance instead of sleeping exactly one TTL. On the
|
||||
// stand both run in the same VM.
|
||||
// Valkey enforces the expiry by the Docker VM clock, which may lag this host
|
||||
// by a fraction of a second, so the 401 is awaited with a tolerance.
|
||||
func TestSessionExpiresAfterTTL(t *testing.T) {
|
||||
const ttl, clockTolerance = 2 * time.Second, 3 * time.Second
|
||||
ts := newTesterWithTTL(t, ttl)
|
||||
|
||||
Reference in New Issue
Block a user