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

    • Type: Task
    • Status: Open
    • Priority: Unknown
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Testing
    • Labels:
      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

            Assignee:
            dmitry.lukyanov Dmitry Lukyanov
            Reporter:
            rstam Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: