Skip to content

Handle scope validation tests #226

Handle scope validation tests

Handle scope validation tests #226

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / test results (ubuntu-latest, node18.x, Release) failed Nov 16, 2023 in 1s

test results (ubuntu-latest, node18.x, Release) ❌

Tests failed

Report Passed Failed Skipped Time
test/dotnet6-node18.x-Release/_fv-az736-57_2023-11-16_01_29_58.trx 63✅ 1❌ 5⚪ 76s
test/dotnet8-node18.x-Release/_fv-az736-57_2023-11-16_01_31_20.trx 88✅ 1❌ 5⚪ 100s

❌ test/dotnet6-node18.x-Release/_fv-az736-57_2023-11-16_01_29_58.trx

69 tests were completed in 76s with 63 passed, 1 failed and 5 skipped.

Test suite Passed Failed Skipped Time
Microsoft.JavaScript.NodeApi.Test.GCTests 1⚪ 1ms
Microsoft.JavaScript.NodeApi.Test.HostedClrTests 28✅ 26s
Microsoft.JavaScript.NodeApi.Test.JSProjectTests 4✅ 49s
Microsoft.JavaScript.NodeApi.Test.JSReferenceTests 4✅ 11ms
Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests 18✅ 1❌ 23ms
Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests 4⚪ 4ms
Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests 9✅ 28ms

✅ Microsoft.JavaScript.NodeApi.Test.GCTests

⚪ GCTest

✅ Microsoft.JavaScript.NodeApi.Test.HostedClrTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/dynamic_generics")
✅ Test(id: "napi-dotnet/dynamic_invoke")
✅ Test(id: "napi-dotnet/dynamic_optional_params")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.JSProjectTests

✅ Test(id: "projects/js-cjs/test")
✅ Test(id: "projects/js-esm/test")
✅ Test(id: "projects/ts-cjs/test")
✅ Test(id: "projects/ts-esm/test")

✅ Microsoft.JavaScript.NodeApi.Test.JSReferenceTests

✅ GetReferenceFromDifferentRootScope
✅ GetReferenceFromDifferentThread
✅ GetReferenceFromParentScope
✅ GetReferenceFromSameScope

❌ Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests

✅ AccessPropertyKeyFromClosedScope
✅ AccessValueFromClosedScope
✅ AccessValueFromDifferentRootScope
✅ AccessValueFromDifferentThread
✅ CreateCallbackScope
✅ CreateEscapableScopeWithinCallback
✅ CreateHandleScopeWithinCallback
✅ CreateHandleScopeWithinModule
✅ CreateHandleScopeWithinRoot
✅ CreateModuleScopeWithinNoContextScope
✅ CreateModuleScopeWithinRootScope
✅ CreateModuleScopeWithoutRoot
✅ CreateNoContextScope
✅ CreateRootScope
✅ CreateValueFromDifferentThread
❌ InvalidCallbackContextScopeNesting
	Assert.Throws() Failure
	Expected: typeof(System.InvalidOperationException)
	Actual:   typeof(Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException): A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
	---- Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException : A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
✅ InvalidModuleContextScopeNesting
✅ InvalidNoContextScopeNesting
✅ InvalidRootContextScopeNesting

✅ Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests

⚪ NodejsCallFunction
⚪ NodejsErrorPropagation
⚪ NodejsStart
⚪ NodejsUnhandledRejection

✅ Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests

✅ GenerateEnum
✅ GenerateGenericClass
✅ GenerateGenericDelegate
✅ GenerateGenericInterface
✅ GenerateSimpleClass
✅ GenerateSimpleDelegate
✅ GenerateSimpleInterface
✅ GenerateSimpleMethod
✅ GenerateSimpleProperty

❌ test/dotnet8-node18.x-Release/_fv-az736-57_2023-11-16_01_31_20.trx

94 tests were completed in 100s with 88 passed, 1 failed and 5 skipped.

Test suite Passed Failed Skipped Time
Microsoft.JavaScript.NodeApi.Test.GCTests 1⚪ 1ms
Microsoft.JavaScript.NodeApi.Test.HostedClrTests 28✅ 23s
Microsoft.JavaScript.NodeApi.Test.JSProjectTests 4✅ 49s
Microsoft.JavaScript.NodeApi.Test.JSReferenceTests 4✅ 2ms
Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests 18✅ 1❌ 35ms
Microsoft.JavaScript.NodeApi.Test.NativeAotTests 25✅ 26s
Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests 4⚪ 4ms
Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests 9✅ 21ms

✅ Microsoft.JavaScript.NodeApi.Test.GCTests

⚪ GCTest

✅ Microsoft.JavaScript.NodeApi.Test.HostedClrTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/dynamic_generics")
✅ Test(id: "napi-dotnet/dynamic_invoke")
✅ Test(id: "napi-dotnet/dynamic_optional_params")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.JSProjectTests

✅ Test(id: "projects/js-cjs/test")
✅ Test(id: "projects/js-esm/test")
✅ Test(id: "projects/ts-cjs/test")
✅ Test(id: "projects/ts-esm/test")

✅ Microsoft.JavaScript.NodeApi.Test.JSReferenceTests

✅ GetReferenceFromDifferentRootScope
✅ GetReferenceFromDifferentThread
✅ GetReferenceFromParentScope
✅ GetReferenceFromSameScope

❌ Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests

✅ AccessPropertyKeyFromClosedScope
✅ AccessValueFromClosedScope
✅ AccessValueFromDifferentRootScope
✅ AccessValueFromDifferentThread
✅ CreateCallbackScope
✅ CreateEscapableScopeWithinCallback
✅ CreateHandleScopeWithinCallback
✅ CreateHandleScopeWithinModule
✅ CreateHandleScopeWithinRoot
✅ CreateModuleScopeWithinNoContextScope
✅ CreateModuleScopeWithinRootScope
✅ CreateModuleScopeWithoutRoot
✅ CreateNoContextScope
✅ CreateRootScope
✅ CreateValueFromDifferentThread
❌ InvalidCallbackContextScopeNesting
	Assert.Throws() Failure
	Expected: typeof(System.InvalidOperationException)
	Actual:   typeof(Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException): A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
	---- Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException : A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
✅ InvalidModuleContextScopeNesting
✅ InvalidNoContextScopeNesting
✅ InvalidRootContextScopeNesting

✅ Microsoft.JavaScript.NodeApi.Test.NativeAotTests

✅ Test(id: "edgejs-perf/measure-latency")
✅ Test(id: "napi-dotnet-init/custom_export")
✅ Test(id: "napi-dotnet-init/custom_init")
✅ Test(id: "napi-dotnet/async_methods")
✅ Test(id: "napi-dotnet/complex_types")
✅ Test(id: "napi-dotnet/delegates")
✅ Test(id: "napi-dotnet/errors")
✅ Test(id: "napi-dotnet/hello")
✅ Test(id: "napi-dotnet/module_class")
✅ Test(id: "napi-dotnet/multi_instance")
✅ Test(id: "napi-dotnet/streams")
✅ Test(id: "node-addon-api/basic_types/array")
✅ Test(id: "node-addon-api/basic_types/boolean")
✅ Test(id: "node-addon-api/basic_types/number")
✅ Test(id: "node-addon-api/basic_types/value")
✅ Test(id: "node-addon-api/object/delete_property")
✅ Test(id: "node-addon-api/object/finalizer")
✅ Test(id: "node-addon-api/object/get_property")
✅ Test(id: "node-addon-api/object/has_own_property")
✅ Test(id: "node-addon-api/object/has_property")
✅ Test(id: "node-addon-api/object/object_freeze_seal")
✅ Test(id: "node-addon-api/object/object")
✅ Test(id: "node-addon-api/object/set_property")
✅ Test(id: "node-addon-api/object/subscript_operator")
✅ Test(id: "node-addon-api/testUtil")

✅ Microsoft.JavaScript.NodeApi.Test.NodejsEmbeddingTests

⚪ NodejsCallFunction
⚪ NodejsErrorPropagation
⚪ NodejsStart
⚪ NodejsUnhandledRejection

✅ Microsoft.JavaScript.NodeApi.Test.TypeDefsGeneratorTests

✅ GenerateEnum
✅ GenerateGenericClass
✅ GenerateGenericDelegate
✅ GenerateGenericInterface
✅ GenerateSimpleClass
✅ GenerateSimpleDelegate
✅ GenerateSimpleInterface
✅ GenerateSimpleMethod
✅ GenerateSimpleProperty

Annotations

Check failure on line 272 in src/NodeApi/JSValueScope.cs

See this annotation in the file changed.

@github-actions github-actions / test results (ubuntu-latest, node18.x, Release)

Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests ► InvalidCallbackContextScopeNesting

Failed test found in:
  test/dotnet6-node18.x-Release/_fv-az736-57_2023-11-16_01_29_58.trx
  test/dotnet8-node18.x-Release/_fv-az736-57_2023-11-16_01_31_20.trx
Error:
  Assert.Throws() Failure
  Expected: typeof(System.InvalidOperationException)
  Actual:   typeof(Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException): A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
  ---- Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException : A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
Raw output
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException): A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
---- Microsoft.JavaScript.NodeApi.JSInvalidThreadAccessException : A Callback scope must be created within a Root, Module, or Callback scope. Current scope: Callback
   at Microsoft.JavaScript.NodeApi.JSValueScope..ctor(JSValueScopeType scopeType, napi_env env, JSRuntime runtime, JSSynchronizationContext synchronizationContext) in /home/runner/work/node-api-dotnet/node-api-dotnet/src/NodeApi/JSValueScope.cs:line 272
   at Microsoft.JavaScript.NodeApi.JSValueScope..ctor(JSValueScopeType scopeType) in /home/runner/work/node-api-dotnet/node-api-dotnet/src/NodeApi/JSValueScope.cs:line 152
   at Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests.<>c.<InvalidCallbackContextScopeNesting>b__15_0() in /home/runner/work/node-api-dotnet/node-api-dotnet/test/JSValueScopeTests.cs:line 267
----- Inner Stack Trace -----
   at Microsoft.JavaScript.NodeApi.JSValueScope..ctor(JSValueScopeType scopeType, napi_env env, JSRuntime runtime, JSSynchronizationContext synchronizationContext) in /home/runner/work/node-api-dotnet/node-api-dotnet/src/NodeApi/JSValueScope.cs:line 272
   at Microsoft.JavaScript.NodeApi.JSValueScope..ctor(JSValueScopeType scopeType) in /home/runner/work/node-api-dotnet/node-api-dotnet/src/NodeApi/JSValueScope.cs:line 152
   at Microsoft.JavaScript.NodeApi.Test.JSValueScopeTests.<>c.<InvalidCallbackContextScopeNesting>b__15_0() in /home/runner/work/node-api-dotnet/node-api-dotnet/test/JSValueScopeTests.cs:line 267