Merge pull request #8409 from overleaf/jk-git-bridge-operation-in-progress

[git-bridge] Operation-in-progress message

GitOrigin-RevId: 2836c3917303f06c7ff2e0b91a36f88237276507
This commit is contained in:
June Kelly
2022-07-12 10:00:28 +01:00
committed by Copybot
parent 2b6b79b1e1
commit c469eaaeaa
10 changed files with 57 additions and 9 deletions

View File

@@ -13,6 +13,7 @@ import uk.ac.ic.wlgitbridge.bridge.resource.ResourceCache;
import uk.ac.ic.wlgitbridge.bridge.snapshot.SnapshotApiFacade;
import uk.ac.ic.wlgitbridge.bridge.swap.job.SwapJob;
import uk.ac.ic.wlgitbridge.bridge.swap.store.SwapStore;
import uk.ac.ic.wlgitbridge.data.CannotAcquireLockException;
import uk.ac.ic.wlgitbridge.git.exception.GitUserException;
import uk.ac.ic.wlgitbridge.snapshot.getdoc.GetDocResult;
@@ -88,7 +89,7 @@ public class BridgeTest {
@Test
public void updatingRepositorySetsLastAccessedTime(
) throws IOException, GitUserException {
) throws IOException, GitUserException, CannotAcquireLockException {
ProjectRepo repo = mock(ProjectRepo.class);
when(repoStore.getExistingRepo("asdf")).thenReturn(repo);
when(dbStore.getProjectState("asdf")).thenReturn(ProjectState.PRESENT);

View File

@@ -8,6 +8,7 @@ import uk.ac.ic.wlgitbridge.bridge.lock.LockGuard;
import uk.ac.ic.wlgitbridge.bridge.lock.ProjectLock;
import uk.ac.ic.wlgitbridge.bridge.repo.ProjectRepo;
import uk.ac.ic.wlgitbridge.bridge.repo.RepoStore;
import uk.ac.ic.wlgitbridge.data.CannotAcquireLockException;
import uk.ac.ic.wlgitbridge.data.ProjectLockImpl;
import java.io.IOException;
@@ -112,6 +113,8 @@ public class GcJobImplTest {
assertFalse(fut.isDone());
Thread.sleep(1);
}
} catch (CannotAcquireLockException e) {
throw new RuntimeException(e);
}
/* Now that we've released the lock, fut should complete */
fut.join();