Skip to content

Instantly share code, notes, and snippets.

View antonfirsov's full-sized avatar

Anton Firszov antonfirsov

View GitHub Profile
internal static class RetryHelper
{
public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int> backoffFunc = null);
}
// Throws custom exceptions, which trigger retries:
internal static class TryAssert
{
public static void Equal(...);
public static void True(...);

Proposed API

I propose to expose a public safe handle type with methods to set and query custom options. These methods would be a direct wrappers around WinHttpSetOption and WinHttpQueryOption, similarly to the concept of Socket.SetRawSocketOption.

public class SafeWinHttpHandle : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
{
    public uint GetWinHttpOption(uint option); 
 public void SetWinHttpOption(uint option, uint optionData);
go to runtime/src/libraries/System.Net.Http/tests/StressTests/HttpStress
run
1. Linux: ./run-docker-compose.sh -b -clientstressargs "-maxExecutionTime 720"
2. Windows: .\run-docker-compose.ps1 -b -w -clientstressargs "-maxExecutionTime 720"
run again for HTTP/1.1
1. Linux: ./run-docker-compose.sh -b -clientstressargs "-maxExecutionTime 720 -http 1.1"
2. Windows: .\run-docker-compose.ps1 -b -w -clientstressargs "-maxExecutionTime 720 -http 1.1"
sudo apt-get install clang-9
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool
sudo apt-get install build-essential
sudo apt-get install python
sudo apt-get install curl
sudo apt-get install git
sudo apt-get install lldb-6.0
sudo apt-get install liblldb-6.0-dev
using System;
using System.IO;
using System.IO.Pipes;
using System.Threading;
using System.Threading.Tasks;
namespace KilledByPipes
{
class Program
{
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities;
using Xunit;
using Xunit.Abstractions;
namespace System.Net.Sockets.Tests
{
public class Repro31570 : SocketTestHelperBase<SocketHelperEap>
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.IO;
using SixLabors.ImageSharp.IO;
using Xunit;
namespace SixLabors.ImageSharp.Tests.IO
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Rfc6265Test
{
public class Program
{
public interface IQuantizer
{
// Remove:
// IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>(Configuration configuration, QuantizerOptions options)
// where TPixel : unmanaged, IPixel<TPixel>;
// Add:
IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration, QuantizerOptions options)
where TPixel : unmanaged, IPixel<TPixel>;
}