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

unit tests: fix CompactionServiceTest.RemoteEventListener (#314) #354

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion db/compaction/compaction_service_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ TEST_F(CompactionServiceTest, FallbackLocalManual) {
VerifyTestData();
}

TEST_F(CompactionServiceTest, DISABLED_RemoteEventListener) {
TEST_F(CompactionServiceTest, RemoteEventListener) {
class RemoteEventListenerTest : public EventListener {
public:
const char* Name() const override { return "RemoteEventListenerTest"; }
Expand Down Expand Up @@ -817,7 +817,13 @@ TEST_F(CompactionServiceTest, DISABLED_RemoteEventListener) {
remote_listeners.emplace_back(listener);

Options options = CurrentOptions();
options.max_background_compactions = 1;
ReopenWithCompactionService(&options);
// multiple compactions might notify on OnSubcompactionBegin simultaneously
ayulas marked this conversation as resolved.
Show resolved Hide resolved
// which will lead to duplicates in the set. job_id is always 1. was the
// intention that no two compaction service jobs run in parallel? or that the
// job_id should be unique?
env_->SetBackgroundThreads(1, Env::LOW);

for (int i = 0; i < 20; i++) {
for (int j = 0; j < 10; j++) {
Expand Down