Skip to content

Commit 3adc1c0

Browse files
Format change from .db to .bustub (#722)
* Format change from .db to .bustub * Changed format from .db to .bustub in /tools folder * Log file (added by mistake in prev commit now removed
1 parent f4c8eca commit 3adc1c0

File tree

10 files changed

+31
-29
lines changed

10 files changed

+31
-29
lines changed

test/buffer/buffer_pool_manager_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace bustub {
2424
// NOLINTNEXTLINE
2525
// Check whether pages containing terminal characters can be recovered
2626
TEST(BufferPoolManagerTest, DISABLED_BinaryDataTest) {
27-
const std::string db_name = "test.db";
27+
const std::string db_name = "test.bustub";
2828
const size_t buffer_pool_size = 10;
2929
const size_t k = 5;
3030

@@ -90,15 +90,15 @@ TEST(BufferPoolManagerTest, DISABLED_BinaryDataTest) {
9090

9191
// Shutdown the disk manager and remove the temporary file we created.
9292
disk_manager->ShutDown();
93-
remove("test.db");
93+
remove("test.bustub");
9494

9595
delete bpm;
9696
delete disk_manager;
9797
}
9898

9999
// NOLINTNEXTLINE
100100
TEST(BufferPoolManagerTest, DISABLED_SampleTest) {
101-
const std::string db_name = "test.db";
101+
const std::string db_name = "test.bustub";
102102
const size_t buffer_pool_size = 10;
103103
const size_t k = 5;
104104

@@ -148,7 +148,7 @@ TEST(BufferPoolManagerTest, DISABLED_SampleTest) {
148148

149149
// Shutdown the disk manager and remove the temporary file we created.
150150
disk_manager->ShutDown();
151-
remove("test.db");
151+
remove("test.bustub");
152152

153153
delete bpm;
154154
delete disk_manager;

test/container/disk/hash/hash_table_page_test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// // NOLINTNEXTLINE
2626
// TEST(HashTablePageTest, DISABLED_DirectoryPageSampleTest) {
27-
// auto *disk_manager = new DiskManager("test.db");
27+
// auto *disk_manager = new DiskManager("test.bustub");
2828
// auto *bpm = new BufferPoolManager(5, disk_manager);
2929

3030
// // get a directory page from the BufferPoolManager
@@ -50,14 +50,14 @@
5050
// // unpin the directory page now that we are done
5151
// bpm->UnpinPage(directory_page_id, true);
5252
// disk_manager->ShutDown();
53-
// remove("test.db");
53+
// remove("test.bustub");
5454
// delete disk_manager;
5555
// delete bpm;
5656
// }
5757

5858
// // NOLINTNEXTLINE
5959
// TEST(HashTablePageTest, DISABLED_BucketPageSampleTest) {
60-
// auto *disk_manager = new DiskManager("test.db");
60+
// auto *disk_manager = new DiskManager("test.bustub");
6161
// auto *bpm = new BufferPoolManager(5, disk_manager);
6262

6363
// // get a bucket page from the BufferPoolManager
@@ -108,7 +108,7 @@
108108
// // unpin the directory page now that we are done
109109
// bpm->UnpinPage(bucket_page_id, true);
110110
// disk_manager->ShutDown();
111-
// remove("test.db");
111+
// remove("test.bustub");
112112
// delete disk_manager;
113113
// delete bpm;
114114
// }

test/container/disk/hash/hash_table_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
// // NOLINTNEXTLINE
2727
// TEST(HashTableTest, DISABLED_SampleTest) {
28-
// auto *disk_manager = new DiskManager("test.db");
28+
// auto *disk_manager = new DiskManager("test.bustub");
2929
// auto *bpm = new BufferPoolManager(50, disk_manager);
3030
// DiskExtendibleHashTable<int, int, IntComparator> ht("blah", bpm, IntComparator(), HashFunction<int>());
3131

@@ -112,7 +112,7 @@
112112
// ht.VerifyIntegrity();
113113

114114
// disk_manager->ShutDown();
115-
// remove("test.db");
115+
// remove("test.bustub");
116116
// delete disk_manager;
117117
// delete bpm;
118118
// }

test/recovery/recovery_test.cpp.disabled

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ class RecoveryTest : public ::testing::Test {
3636
protected:
3737
// This function is called before every test.
3838
void SetUp() override {
39-
remove("test.db");
39+
remove("test.bustub");
4040
remove("test.log");
4141
}
4242

4343
// This function is called after every test.
4444
void TearDown() override {
4545
LOG_INFO("Tearing down the system..");
46-
remove("test.db");
46+
remove("test.bustub");
4747
remove("test.log");
4848
};
4949
};
5050

5151
// NOLINTNEXTLINE
5252
TEST_F(RecoveryTest, DISABLED_RedoTest) {
53-
auto *bustub_instance = new BustubInstance("test.db");
53+
auto *bustub_instance = new BustubInstance("test.bustub");
5454

5555
ASSERT_FALSE(enable_logging);
5656
LOG_INFO("Skip system recovering...");
@@ -92,7 +92,7 @@ TEST_F(RecoveryTest, DISABLED_RedoTest) {
9292
delete bustub_instance;
9393

9494
LOG_INFO("System restart...");
95-
bustub_instance = new BustubInstance("test.db");
95+
bustub_instance = new BustubInstance("test.bustub");
9696

9797
ASSERT_FALSE(enable_logging);
9898
LOG_INFO("Check if tuple is not in table before recovery");
@@ -139,7 +139,7 @@ TEST_F(RecoveryTest, DISABLED_RedoTest) {
139139

140140
// NOLINTNEXTLINE
141141
TEST_F(RecoveryTest, DISABLED_UndoTest) {
142-
auto *bustub_instance = new BustubInstance("test.db");
142+
auto *bustub_instance = new BustubInstance("test.bustub");
143143

144144
ASSERT_FALSE(enable_logging);
145145
LOG_INFO("Skip system recovering...");
@@ -176,7 +176,7 @@ TEST_F(RecoveryTest, DISABLED_UndoTest) {
176176
delete bustub_instance;
177177

178178
LOG_INFO("System restarted..");
179-
bustub_instance = new BustubInstance("test.db");
179+
bustub_instance = new BustubInstance("test.bustub");
180180

181181
LOG_INFO("Check if tuple exists before recovery");
182182
Tuple old_tuple;
@@ -218,7 +218,7 @@ TEST_F(RecoveryTest, DISABLED_UndoTest) {
218218

219219
// NOLINTNEXTLINE
220220
TEST_F(RecoveryTest, DISABLED_CheckpointTest) {
221-
auto *bustub_instance = new BustubInstance("test.db");
221+
auto *bustub_instance = new BustubInstance("test.bustub");
222222

223223
EXPECT_FALSE(enable_logging);
224224
LOG_INFO("Skip system recovering...");

test/storage/disk_manager_test.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ class DiskManagerTest : public ::testing::Test {
2222
protected:
2323
// This function is called before every test.
2424
void SetUp() override {
25-
remove("test.db");
25+
remove("test.bustub");
2626
remove("test.log");
2727
}
2828

2929
// This function is called after every test.
3030
void TearDown() override {
31-
remove("test.db");
31+
remove("test.bustub");
3232
remove("test.log");
3333
};
3434
};
@@ -37,7 +37,7 @@ class DiskManagerTest : public ::testing::Test {
3737
TEST_F(DiskManagerTest, ReadWritePageTest) {
3838
char buf[BUSTUB_PAGE_SIZE] = {0};
3939
char data[BUSTUB_PAGE_SIZE] = {0};
40-
std::string db_file("test.db");
40+
std::string db_file("test.bustub");
4141
auto dm = DiskManager(db_file);
4242
std::strncpy(data, "A test string.", sizeof(data));
4343

@@ -59,7 +59,7 @@ TEST_F(DiskManagerTest, ReadWritePageTest) {
5959
TEST_F(DiskManagerTest, ReadWriteLogTest) {
6060
char buf[16] = {0};
6161
char data[16] = {0};
62-
std::string db_file("test.db");
62+
std::string db_file("test.bustub");
6363
auto dm = DiskManager(db_file);
6464
std::strncpy(data, "A test string.", sizeof(data));
6565

@@ -73,6 +73,8 @@ TEST_F(DiskManagerTest, ReadWriteLogTest) {
7373
}
7474

7575
// NOLINTNEXTLINE
76-
TEST_F(DiskManagerTest, ThrowBadFileTest) { EXPECT_THROW(DiskManager("dev/null\\/foo/bar/baz/test.db"), Exception); }
76+
TEST_F(DiskManagerTest, ThrowBadFileTest) {
77+
EXPECT_THROW(DiskManager("dev/null\\/foo/bar/baz/test.bustub"), Exception);
78+
}
7779

7880
} // namespace bustub

test/table/tuple_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TEST(TupleTest, DISABLED_TableHeapTest) {
3737
Tuple tuple = ConstructTuple(&schema);
3838

3939
// create transaction
40-
auto *disk_manager = new DiskManager("test.db");
40+
auto *disk_manager = new DiskManager("test.bustub");
4141
auto *buffer_pool_manager = new BufferPoolManager(50, disk_manager);
4242
auto *table = new TableHeap(buffer_pool_manager);
4343

@@ -54,7 +54,7 @@ TEST(TupleTest, DISABLED_TableHeapTest) {
5454
}
5555

5656
disk_manager->ShutDown();
57-
remove("test.db"); // remove db file
57+
remove("test.bustub"); // remove db file
5858
remove("test.log");
5959
delete table;
6060
delete buffer_pool_manager;

tools/b_plus_tree_printer/b_plus_tree_printer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ auto main(int argc, char **argv) -> int {
7272

7373
GenericComparator<8> comparator(key_schema.get());
7474

75-
auto *disk_manager = new DiskManager("test.db");
75+
auto *disk_manager = new DiskManager("test.bustub");
7676
auto *bpm = new BufferPoolManager(100, disk_manager);
7777
// create and fetch header_page
7878
page_id_t page_id;
@@ -136,7 +136,7 @@ auto main(int argc, char **argv) -> int {
136136
delete bpm;
137137
delete transaction;
138138
delete disk_manager;
139-
remove("test.db");
139+
remove("test.bustub");
140140
remove("test.log");
141141

142142
return 0;

tools/shell/shell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ auto GetWidthOfUtf8(const void *beg, const void *end, size_t *width) -> int {
2929
auto main(int argc, char **argv) -> int {
3030
ft_set_u8strwid_func(&GetWidthOfUtf8);
3131

32-
auto bustub = std::make_unique<bustub::BustubInstance>("test.db");
32+
auto bustub = std::make_unique<bustub::BustubInstance>("test.bustub");
3333

3434
auto default_prompt = "bustub> ";
3535
auto emoji_prompt = "\U0001f6c1> "; // the bathtub emoji

tools/sqllogictest/sqllogictest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ auto main(int argc, char **argv) -> int { // NOLINT
257257
if (program.get<bool>("--in-memory")) {
258258
bustub = std::make_unique<bustub::BustubInstance>();
259259
} else {
260-
bustub = std::make_unique<bustub::BustubInstance>("test.db");
260+
bustub = std::make_unique<bustub::BustubInstance>("test.bustub");
261261
}
262262

263263
bustub->GenerateMockTable();

tools/wasm-bpt-printer/wasm-bpt-printer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ auto BustubInit(int leaf_max_size, int internal_max_size) -> int {
5757

5858
GenericComparator<8> comparator(key_schema.get());
5959

60-
auto *disk_manager = new DiskManager("test.db");
60+
auto *disk_manager = new DiskManager("test.bustub");
6161
bpm = new BufferPoolManager(100, disk_manager);
6262
// create header_page
6363
page_id_t page_id;

0 commit comments

Comments
 (0)