OrleansTestKit icon indicating copy to clipboard operation
OrleansTestKit copied to clipboard

Added support of GetPrimaryKey

Open Ilchert opened this issue 6 years ago • 5 comments

Added support of GetPrimaryKey in GrainReference and IAddressable. #47, #73

Ilchert avatar Jul 18 '19 11:07 Ilchert

It might take me a bit to review this. Off the cuff... I'm a bit concerned about the long-term maintenance of all the reflection magic. This library originally used lots of reflection magic to make things work (I don't recall if that was published to NuGet, it may have been our internally used bits before we were able to open source the library).

@dsarfati Do you recall injecting the IActivationData? What do you think of this reflection-based approach?

seniorquico avatar Jul 20 '19 02:07 seniorquico

There is the only way to support Grain.GrainReference via reflection. We have already had some reflection and in short, this pull request just sets Grain.Data filed to properly configured IActivationData instance.

I did it to test my custom GrainStorage. It receives GrainReference as a parameter, but test grain hasn't set up Grain.GrainReference properly.

Ilchert avatar Jul 22 '19 08:07 Ilchert

@seniorquico Any update here?

Ilchert avatar Jul 25 '19 08:07 Ilchert

@seniorquico I am still here :)

Ilchert avatar Aug 15 '19 12:08 Ilchert

Codecov Report

Merging #74 (3639658) into master (bc1b86b) will decrease coverage by 1.39%. The diff coverage is 69.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   80.71%   79.31%   -1.40%     
==========================================
  Files          29       29              
  Lines         420      469      +49     
  Branches       45       58      +13     
==========================================
+ Hits          339      372      +33     
- Misses         69       77       +8     
- Partials       12       20       +8     
Impacted Files Coverage Δ
src/OrleansTestKit/TestGrainCreator.cs 72.13% <68.62%> (-19.54%) :arrow_down:
src/OrleansTestKit/TestGrainIdentity.cs 84.37% <75.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bc1b86b...3639658. Read the comment docs.

codecov[bot] avatar Nov 10 '20 08:11 codecov[bot]

This PR needs to be rebased and reopened against the 3.x branch. Note- this issue has been fixed in version 4 and above the Orleans TestKit (which support Orleans 7+).

seniorquico avatar Jan 07 '24 06:01 seniorquico