Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3733

Don't modify the value of environment variables in test code

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • Labels:
      None

      Remove any calls to

      Environment.SetEnvironmentVariable
      

      Environment variables by definition should be passed in from the environment and not altered while the process iss running.

      I think we are currently getting away with this because the original values of the environment variables are only read once, and read early enough that they are captured before some test modifies them. But this is fragile.

      For the tests that are doing this, we need to find some other way to satisfy what they need that doesn't involve changing the value of environment variables on the fly.

       

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: