Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(source-control): allow clones to finish without a deadline #9844

ClosedGigioxx(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9844/headopened View on GitHub

Showing 2 changed files with 59 additions and 1 deletion.

x
0 of 2 viewed, 2 left
58 additions and 0 deletionsapps/server/src/sourceControl/SourceControlRepositoryService.test.tsModified
View file
@@ -2,10 +2,15 @@
import * as NodeServices from "@effect/platform-node/NodeServices";
import { assert, it } from "@effect/vitest";
import * as Effect from "effect/Effect";
+import * as Deferred from "effect/Deferred";
import * as FileSystem from "effect/FileSystem";
+import * as Fiber from "effect/Fiber";
import * as Path from "effect/Path";
import * as Layer from "effect/Layer";
import * as PlatformError from "effect/PlatformError";
+import * as Sink from "effect/Sink";
+import * as Stream from "effect/Stream";
+import * as TestClock from "effect/testing/TestClock";
import { ChildProcessSpawner } from "effect/unstable/process";
​
import { GitCommandError, SourceControlProviderError } from "@t3tools/contracts";
@@ -197,6 +202,59 @@
}).pipe(Effect.provide(NodeServices.layer)),
​
+it.effect("allows a clone to finish after more than two minutes", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const parent = yield* fs.makeTempDirectoryScoped();
+ const path = yield* Path.Path;
+ const destinationPath = path.join(parent, "t3code");
+ const started = yield* Deferred.make<void>();
+ const git = yield* GitVcsDriver.make.pipe(
+ Effect.provideService(