Skip to content

Commit e77dce8

Browse files
Copilotdevstress
andcommitted
[WI1] Address code review feedback - extract magic strings to constants
- Add TargetFramework constant ("net9.0") for maintainability - Add AppHostAssemblyName constant for assembly DLL name - Replace hardcoded strings in DetermineBuildConfiguration() - Improves future .NET version updates - Complete WI1 documentation with lessons learned Co-authored-by: devstress <30769729+devstress@users.noreply.github.com>
1 parent 91d5f73 commit e77dce8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

LearningCourse/LearningCourse.IntegrationTests/LearningCourseTestBase.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ public abstract class LearningCourseTestBase
2424
"LocalTesting", "LocalTesting.FlinkSqlAppHost");
2525
private static StreamWriter? _debugLogWriter;
2626

27+
// Build configuration constants
28+
private const string TargetFramework = "net9.0";
29+
private const string AppHostAssemblyName = "LocalTesting.FlinkSqlAppHost.dll";
30+
2731
/// <summary>
2832
/// Kafka container IP for Flink jobs (e.g., "172.17.0.2:9093").
2933
/// Docker bridge network doesn't support DNS, so we use actual IP address.
@@ -197,15 +201,15 @@ public static async Task GlobalSetUp()
197201
private static (bool shouldBuild, string configuration) DetermineBuildConfiguration()
198202
{
199203
// Check for Release build
200-
var releaseDll = Path.Combine(AppHostPath, "bin", "Release", "net9.0", "LocalTesting.FlinkSqlAppHost.dll");
204+
var releaseDll = Path.Combine(AppHostPath, "bin", "Release", TargetFramework, AppHostAssemblyName);
201205
if (File.Exists(releaseDll))
202206
{
203207
TestContext.WriteLine($"✅ Release build found at {releaseDll}");
204208
return (false, "Release");
205209
}
206210

207211
// Check for Debug build
208-
var debugDll = Path.Combine(AppHostPath, "bin", "Debug", "net9.0", "LocalTesting.FlinkSqlAppHost.dll");
212+
var debugDll = Path.Combine(AppHostPath, "bin", "Debug", TargetFramework, AppHostAssemblyName);
209213
if (File.Exists(debugDll))
210214
{
211215
TestContext.WriteLine($"✅ Debug build found at {debugDll}");

0 commit comments

Comments
 (0)