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

Execution hooks failing with Execution Context #110

Closed
raweaver opened this issue Sep 2, 2020 · 2 comments
Closed

Execution hooks failing with Execution Context #110

raweaver opened this issue Sep 2, 2020 · 2 comments
Assignees
Labels

Comments

@raweaver
Copy link
Contributor

raweaver commented Sep 2, 2020

Using version 0.1.6 of dotnet plugin, the Execution Hooks fail when using the ExecutionContext argument. The following stack trace is from a failure to execute a BeforeScenario hook.

Error Message: Parameter count mismatch.
Stacktrace:
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Gauge.Dotnet.Wrappers.ReflectionWrapper.Invoke(MethodInfo method, Object obj, Object[] args) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/Wrappers/ReflectionWrapper.cs:line 27
at Gauge.Dotnet.MethodExecutor.Execute(MethodInfo method, Object[] parameters) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/MethodExecutor.cs:line 42
at Gauge.Dotnet.HookExecutor.Execute(String hookType, IHooksStrategy strategy, IList`1 applicableTags, ExecutionContext context) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/HookExecutor.cs:line 35

Reverting to version 0.1.5 of the dotnet plugin allowed us to run the scenario successfully with the Execution Hooks utilizing the ExecutionContext.

Reviewing the tests, it appears the Execution Hooks are only testing with void argument and not with the ExecutionContext argument.

Any help would be greatly appreciated.
Thank you!

@ismailmutlu
Copy link

Last version (0.1.6) of dotnet plugin causes this failing, when using ExecutionContext parameter in hook methods
(Gauge Versions => 1.0.7, 1.0.8, 1.1.0, 1.1.1, 1.1.3)

Also this dotnet version causes timeout exception (Timed out connecting to 127.0.0.1:50498) for Gauge Version 1.0.6 (Commit Hash: 2bc49db).

@sriv
Copy link
Member

sriv commented Sep 7, 2020

thanks for reporting, can replicate this issue. Will roll out a fix.

@sriv sriv self-assigned this Sep 7, 2020
@sriv sriv added the bug label Sep 7, 2020
sriv added a commit that referenced this issue Sep 8, 2020
Signed-off-by: sriv <srikanth.ddit@gmail.com>
@sriv sriv closed this as completed in af954e8 Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants