Skip to content

Commit

Permalink
Merge pull request #27 from viordash/tests
Browse files Browse the repository at this point in the history
Tests
  • Loading branch information
viordash committed Oct 1, 2023
2 parents 2fafb57 + 329c6f9 commit c1f3364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public async Task Send_Common_Big_Data_Test() {
clipboardData.Add("Text", new MemoryStream(bytes));

await client.SendData(clipboardData);
await Task.Delay(3000);
await server.Stop();
client.Stop();

Expand Down Expand Up @@ -145,6 +146,7 @@ public async Task Send_Files_Test() {

} finally {
Directory.Delete(testsPath, true);
await Task.Delay(1000);
await server.Stop();
client.Stop();
}
Expand Down Expand Up @@ -202,6 +204,7 @@ public async Task Send_Big_File_Test() {
await client.SendFileDropList(files);
} finally {
Directory.Delete(testsPath, true);
await Task.Delay(3000);
await server.Stop();
client.Stop();
}
Expand Down Expand Up @@ -275,6 +278,7 @@ public async Task Send_Files_And_Folders_Test() {
await client.SendFileDropList(files);
} finally {
Directory.Delete(testsPath, true);
await Task.Delay(1000);
await server.Stop();
client.Stop();
}
Expand Down Expand Up @@ -360,6 +364,7 @@ public async Task Send_identical_Files__Test() {
await client.SendFileDropList(files);
} finally {
Directory.Delete(testsPath, true);
await Task.Delay(500);
await server.Stop();
client.Stop();
}
Expand Down
10 changes: 0 additions & 10 deletions ShareClipbrd/ShareClipbrd.Core/Services/DataClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ async ValueTask<NetworkStream> Handshake() {

public async Task SendFileDropList(StringCollection fileDropList) {
cts.Cancel();
// var inProcess = !pingTimer.Enabled;
// if(inProcess) {
// Debug.WriteLine("--- inProcess 0");
// await Task.Delay(1000);
// }
cts = new();
var cancellationToken = cts.Token;
try {
Expand Down Expand Up @@ -119,11 +114,6 @@ static async Task SendSize(Int64 size, NetworkStream stream, CancellationToken c

public async Task SendData(ClipboardData clipboardData) {
cts.Cancel();
// var inProcess = !pingTimer.Enabled;
// if(inProcess) {
// Debug.WriteLine("--- inProcess 0");
// await Task.Delay(1000);
// }
cts = new();
var cancellationToken = cts.Token;
try {
Expand Down

0 comments on commit c1f3364

Please sign in to comment.