提交 476e179d 编写于 作者: S Sandeep Somavarapu

more tests

上级 0457cb19
......@@ -11,6 +11,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { VSBuffer } from 'vs/base/common/buffer';
import { joinPath } from 'vs/base/common/resources';
import { CancellationToken } from 'vs/base/common/cancellation';
suite('UserDataSyncService', () => {
......@@ -508,4 +509,22 @@ suite('UserDataSyncService', () => {
});
test('test can run sync taks only once', async () => {
// Setup the client
const target = new UserDataSyncTestServer();
const client = disposableStore.add(new UserDataSyncClient(target));
await client.setUp();
const testObject = client.instantiationService.get(IUserDataSyncService);
const syncTask = await testObject.createSyncTask();
await syncTask.run(CancellationToken.None);
try {
await syncTask.run(CancellationToken.None);
assert.fail('Should fail running the task again');
} catch (error) {
/* expected */
}
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册