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

CouchbaseRepositoryQueryIntegrationTests.testExpiration broken after fixing ThreadLocal storage with save() #1839

Open
mikereiche opened this issue Oct 10, 2023 · 1 comment
Assignees
Labels
type: regression A regression from a previous release

Comments

@mikereiche
Copy link
Collaborator

CouchbaseRepositoryQueryIntegrationTests.testExpiration:759 expected: not equal but was: <0>a

It's because Options are now discarded on save()

	public void testExpiration() {
		Airport airport = new Airport("1", "iata21", "icao21");
		airportRepository.withOptions(InsertOptions.insertOptions().expiry(Duration.ofSeconds(10))).save(airport);
		Airport foundAirport = airportRepository.findByIata(airport.getIata());
		assertNotEquals(0, foundAirport.getExpiration());
		airportRepository.delete(airport);
	}
@mikereiche mikereiche added the type: regression A regression from a previous release label Oct 10, 2023
@mikereiche
Copy link
Collaborator Author

use template.withOptions(...).insertById(...).one(airport) instead.

@mikereiche mikereiche self-assigned this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

1 participant