Skip to content

test: fix failing example tests#124

Merged
pavelnikolov merged 1 commit into
masterfrom
fix-failing-example-tests
May 27, 2026
Merged

test: fix failing example tests#124
pavelnikolov merged 1 commit into
masterfrom
fix-failing-example-tests

Conversation

@pavelnikolov
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 10:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves the example tests from the example/ subdirectory into the package root so they are detected and executed by go test, and renames the example functions to follow Go's ExampleX_Y convention so they appear in godoc under NewBatchedLoader.

Changes:

  • Relocates ttl_cache/go-cache example into example_go_cache_test.go at repo root under package dataloader_test.
  • Renames cache adapter types and example functions (e.g. ExampleGolangLRUExampleNewBatchedLoader_golangLRU) to avoid collisions and conform to godoc example naming.
  • Updates README to reflect the new example location.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updates pointer to example location.
example/ttl_cache/go_cache_test.go Deletes the old example file (moved to repo root).
example_no_cache_test.go Repackages under dataloader_test; minor comment cleanup.
example_golang_lru_test.go Repackages under dataloader_test, renames adapter type and example function.
example_go_cache_test.go New file containing the relocated go-cache example with renamed adapter and example function.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pavelnikolov pavelnikolov merged commit 3234b4f into master May 27, 2026
2 checks passed
@pavelnikolov pavelnikolov deleted the fix-failing-example-tests branch May 27, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants