Esempio n. 1
0
        private bool TestSqosVersion(string share, SQOS_PROTOCOL_VERSION version)
        {
            using (SqosClient client = new SqosClient(new TimeSpan(0, 0, defaultTimeoutInSeconds)))
            {
                client.ConnectToVHD(
                    SUTName, SUTIpAddress, Credential.DomainName, Credential.AccountName, Credential.Password, SecurityPackageType,
                    true, share, vhdName);
                SqosRequestPacket sqosRequest = new SqosRequestPacket(version == SQOS_PROTOCOL_VERSION.Sqos10 ? SqosRequestType.V10 : SqosRequestType.V11,
                                                                      (ushort)version,
                                                                      SqosOptions_Values.STORAGE_QOS_CONTROL_FLAG_SET_LOGICAL_FLOW_ID | SqosOptions_Values.STORAGE_QOS_CONTROL_FLAG_GET_STATUS,
                                                                      Guid.NewGuid(),
                                                                      Guid.Empty,
                                                                      Guid.Empty,
                                                                      string.Empty,
                                                                      string.Empty
                                                                      );
                SqosResponsePacket sqosResponse;
                uint status = client.SendAndReceiveSqosPacket(
                    sqosRequest,
                    out sqosResponse);

                if (status != Smb2Status.STATUS_SUCCESS)
                {
                    return(false);
                }

                return((ushort)version == sqosResponse.Header.ProtocolVersion);
            }
        }
Esempio n. 2
0
        protected override void TestInitialize()
        {
            base.TestInitialize();

            testConfig = new SqosTestConfig(BaseTestSite);

            BaseTestSite.DefaultProtocolDocShortName = "MS-SQOS";

            client = new SqosClient(TestConfig.Timeout);
        }
        protected override void TestInitialize()
        {
            base.TestInitialize();

            testConfig = new SqosTestConfig(BaseTestSite);

            BaseTestSite.DefaultProtocolDocShortName = "MS-SQOS";

            client = new SqosClient(TestConfig.Timeout);

            // Copy the data used in test cases to the share of the SUT, e.g. the shared virtual disk files.
            sutProtocolController.CopyFile(TestConfig.FullPathShareContainingSharedVHD, @"data\*.*");
        }