Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the test project individually for each cadl ranch project #5570

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

ArcturusZhang
Copy link
Member

Fixes #5564

@ArcturusZhang ArcturusZhang added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jan 10, 2025
@@ -219,5 +225,185 @@ private Task MultiBinaryParts(bool hasPicture) => Test(async (host) =>
var response = await new MultiPartClient(host, null).GetFormDataClient().MultiBinaryPartsAsync(content, content.ContentType, null);
Assert.AreEqual(204, response.GetRawResponse().Status);
});

internal partial class MultiPartFormDataBinaryContent : BinaryContent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to copy this here because despite this is generated, it is internal.
We cannot use internal any more in this structure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? How did it work before? Were we using InternalsVisibleTo?

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

}
}
});
// [CadlRanchTest]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because its corresponding source code project has an issue to compile: #5566

Copy link
Member Author

@ArcturusZhang ArcturusZhang Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow i cannot reproduce the issue :( or it initially does not have it. I will close it and restore this test case

@@ -90,11 +90,6 @@
"commandName": "Executable",
"executablePath": "$(SolutionDir)/../dist/generator/Microsoft.Generator.CSharp.exe"
},
"http-parameters-spread": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See these issues:
#5568
#5567
#5565

private static bool IsProtocolMethod(MethodInfo method)
=> method.GetParameters().Any(parameter => parameter.ParameterType.Equals(typeof(BinaryContent)));
}
// public class SpreadTests : CadlRanchTestBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify why these are commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an issue for this: #5565


namespace TestProjects.CadlRanch.Tests.Http.Resiliency.SrvDriven.V2
{
public partial class SrvDrivenV2Tests : CadlRanchTestBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to retain these tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the issue: #5567

@@ -21,10 +21,10 @@
<ProjectReference Include="..\..\Microsoft.Generator.CSharp\test\common\Microsoft.Generator.CSharp.Tests.Common.csproj" />
</ItemGroup>

<ItemGroup>
<!-- <ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I meant to remove them. I will update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[http-client-csharp] isolating cadl ranch test case projects
3 participants