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

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

    XMLWordPrintable

Details

    • Task
    • Status: Backlog
    • Unknown
    • Resolution: Unresolved
    • None
    • None
    • Testing
    • None

    Description

      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.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: