0

I am facing an issue while trying to run the test using runsettings file. We have one redis cache with SSL enabled which we are trying to access from our tests.

StackExchange.Redis.RedisConnectionException: No connection is available to service this operation: SET sample.TM.test|ConnectionSample|System.String|Sample ---> StackExchange.Redis.RedisConnectionException: SocketFailure on .cache.windows.net:6380/Subscription, origin: Connected, input-buffer: 0, outstanding: 0, last-read: 1s ago, last-write: 1s ago, unanswered-write: 464270s ago, keep-alive: 60s, pending: 0, state: Connecting, last-heartbeat: never, last-mbeat: -1s ago, global: 1s ago, mgr: Inactive, err: never ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

When are able to run the same tests without using this runsettings.

Is there anyway I can successfully run the tests without migrating to MSTest V2?

OR

Can I use the same Test Controller/Agent setup with MSTest V2 for running tests?

  • Please see the runsettings file that I am using. ** x86 ..\Portal\TestResults True false Local.testsettings true ** – Sanoop Karakkat Jul 22 '20 at 08:33
  • Can other programs connect to and use your redis cache service normally? – Jason Pan Jul 23 '20 at 08:22
  • @JasonPan Yes. The tests itself is running (is able to connect to redis) if I am not specifying the .runsettings. The issue happens only when we are providing the runsettings file and tries to execute the tests. As per the analysis, what I found is "" tag is making some changes to the way the test is trying to access the redis. I couldn't find what exactly is the difference when we specify the as true in runsettings file. – Sanoop Karakkat Jul 23 '20 at 08:37

1 Answers1

0

I was able to solve this issue by adding following keys to the registry of my test agent machines.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001