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

feat: support spring cache mock #123

Merged
merged 1 commit into from
Mar 23, 2023
Merged

feat: support spring cache mock #123

merged 1 commit into from
Mar 23, 2023

Conversation

YongwuHe
Copy link
Collaborator

@YongwuHe YongwuHe commented Mar 20, 2023

Demo:

need mock method:

@Cacheable(value = "myCache")

public Mealrecomrestaurant queryByPk(Number id)
		throws SQLException {
	return queryByPk(id, null);
}

dynamic class configuration:

FullclassName:com.ctrip.flight.arex.dao.MealrecomRestaurantDao
methodName: queryByPk
parameterType: java.lang.Number

@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #123 (120b41f) into main (ebcca9f) will increase coverage by 0.28%.
The diff coverage is 80.64%.

❗ Current head 120b41f differs from pull request most recent head 1dd11c5. Consider uploading reports for the commit 1dd11c5 to get more accurate results

@@             Coverage Diff              @@
##               main     #123      +/-   ##
============================================
+ Coverage     40.30%   40.59%   +0.28%     
- Complexity      963      977      +14     
============================================
  Files           200      203       +3     
  Lines          7770     7824      +54     
  Branches        870      881      +11     
============================================
+ Hits           3132     3176      +44     
- Misses         4338     4343       +5     
- Partials        300      305       +5     
Impacted Files Coverage Δ
...x/inst/dynamic/common/listener/DirectExecutor.java 100.00% <ø> (ø)
...namic/common/listener/ListenableFutureAdapter.java 100.00% <ø> (ø)
...inst/dynamic/common/listener/ResponseConsumer.java 100.00% <ø> (ø)
...rex/inst/dynamic/common/DynamicClassExtractor.java 75.24% <50.00%> (ø)
...java/io/arex/inst/dynamic/ReplaceMethodHelper.java 80.48% <57.14%> (-3.73%) ⬇️
...o/arex/inst/spring/SpringCacheInstrumentation.java 77.27% <77.27%> (ø)
...a/io/arex/inst/spring/SpringCacheAdviceHelper.java 88.00% <88.00%> (ø)
...arex/inst/dynamic/DynamicClassInstrumentation.java 85.34% <100.00%> (+0.12%) ⬆️
.../inst/spring/SpringCacheModuleInstrumentation.java 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@YongwuHe YongwuHe force-pushed the feat_springCache branch 4 times, most recently from 865ed8a to 03164c7 Compare March 21, 2023 03:37
@mr3 mr3 marked this pull request as draft March 21, 2023 09:50
@YongwuHe YongwuHe force-pushed the feat_springCache branch 3 times, most recently from ea500ae to b2cb154 Compare March 23, 2023 07:04
mr3
mr3 previously approved these changes Mar 23, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2023

Please retry analysis of this Pull-Request directly on SonarCloud.

@YongwuHe YongwuHe marked this pull request as ready for review March 23, 2023 12:10
@YongwuHe YongwuHe requested a review from mr3 March 23, 2023 12:10
lucas-myx
lucas-myx previously approved these changes Mar 23, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

81.2% 81.2% Coverage
0.0% 0.0% Duplication

@YongwuHe YongwuHe requested a review from lucas-myx March 23, 2023 12:20
@YongwuHe YongwuHe merged commit 7728973 into main Mar 23, 2023
@YongwuHe YongwuHe deleted the feat_springCache branch March 23, 2023 12:27
@mr3 mr3 added the enhancement ⭐ New feature or request label Mar 23, 2023
@mr3
Copy link
Collaborator

mr3 commented May 8, 2023

releated issue: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ⭐ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants