File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
modules/platforms/dotnet/Apache.Ignite.Tests/Compute Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,15 @@ public static class DotNetJobs
4545
4646 public static async Task < string > WriteNewerDotnetJobsAssembly ( string tempDirPath , string asmName )
4747 {
48- var targetPath = Path . Combine ( tempDirPath , asmName + ".dll" ) ;
48+ var targetFile = Path . Combine ( tempDirPath , asmName + ".dll" ) ;
49+
50+ await using var fileStream = File . Create ( targetFile ) ;
4951
5052 await Assembly . GetExecutingAssembly ( )
5153 . GetManifestResourceStream ( "Apache.Ignite.Tests.Compute.Executor.NewerDotnetJobs.NewerDotnetJobs.dll" ) !
52- . CopyToAsync ( File . Create ( targetPath ) ) ;
54+ . CopyToAsync ( fileStream ) ;
5355
54- return targetPath ;
56+ return targetFile ;
5557 }
5658
5759 public class AddOneJob : IComputeJob < int , int >
Original file line number Diff line number Diff line change @@ -288,9 +288,16 @@ public async Task TestPlatformExecutorWithOldServerThrowsCompatibilityError()
288288 }
289289
290290 [ Test ]
291- public async Task TestNewerDotnetVersionAssembly ( )
291+ public void TestNewerDotnetVersionAssembly ( )
292292 {
293- await ExecJobAsync ( DotNetJobs . NewerDotNetJob , "test" ) ;
293+ var ex = Assert . ThrowsAsync < IgniteException > ( async ( ) => await ExecJobAsync ( DotNetJobs . NewerDotNetJob , "test" ) ) ;
294+
295+ StringAssert . StartsWith (
296+ ".NET job failed: Failed to load type 'NewerDotnetJobs.EchoJob, NewerDotnetJobs' " +
297+ "because it depends on a newer .NET runtime version (required: 10, current: 8" ,
298+ ex . Message ) ;
299+
300+ Assert . AreEqual ( "IGN-COMPUTE-9" , ex . CodeAsString ) ;
294301 }
295302
296303 private async Task < IClusterNode > GetClusterNodeAsync ( string ? suffix = null )
You can’t perform that action at this time.
0 commit comments