Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ it.layer(NodeServices.layer)("RepositoryIdentityResolverLive", (it) => {
);

it.effect(
"refreshes cached null identities after the negative TTL when a remote is configured later",
"keeps null identities cached across repeated resolves until the negative TTL expires",
() =>
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
Expand All @@ -128,8 +128,10 @@ it.layer(NodeServices.layer)("RepositoryIdentityResolverLive", (it) => {

yield* git(cwd, ["remote", "add", "origin", "git@github.com:T3Tools/t3code.git"]);

const cachedIdentity = yield* resolver.resolve(cwd);
expect(cachedIdentity).toBeNull();
for (const _attempt of [1, 2, 3]) {
const cachedIdentity = yield* resolver.resolve(cwd);
expect(cachedIdentity).toBeNull();
}

yield* TestClock.adjust(Duration.millis(120));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function buildRepositoryIdentity(input: {

const DEFAULT_REPOSITORY_IDENTITY_CACHE_CAPACITY = 512;
const DEFAULT_POSITIVE_CACHE_TTL = Duration.minutes(1);
const DEFAULT_NEGATIVE_CACHE_TTL = Duration.seconds(10);
const DEFAULT_NEGATIVE_CACHE_TTL = Duration.minutes(1);

interface RepositoryIdentityResolverOptions {
readonly cacheCapacity?: number;
Expand Down
Loading