Name Description Size
base_gloda_content.js Tests the operation of the GlodaContent (in GlodaContent.sys.mjs) and its exposure via Gloda.getMessageContent. This may also be implicitly tested by indexing and fulltext query tests (on messages), but the buck stops here for the content stuff. Currently, we just test quoting removal and that the content turns out right. We do not actually verify that the quoted blocks are correct (aka we might screw up eating the greater-than signs). (We have no known consumers who care about the quoted blocks.) 6377
base_index_junk.js Test indexing in the face of junk classification and junk folders. It is gloda policy not to index junk mail. A similar test that moving things to the trash folder is deletion happens in base_index_messages.js. 7492
base_index_messages.js This file tests our indexing prowess. This includes both our ability to properly be triggered by events taking place in thunderbird as well as our ability to correctly extract/index the right data. In general, if these tests pass, things are probably working quite well. This test has local, IMAP online, IMAP offline, and IMAP online-become-offline variants. See the text_index_messages_*.js files. Things we don't test that you think we might test: - Full-text search. Happens in query testing. 50719
base_query_messages.js This file tests our querying support. We build up a deterministic little 'world' of messages spread across multiple conversations, multiple folders and multiple authors. To verify expected negative results, in addition to the 'peoples' in our world clique, we also have 'outlier' contacts that do not communicate with the others (but are also spread across folders). This is broadly intended to test all of our query features and mechanisms (apart from our specialized search implementation, which is tested by test_search_messages.js), but is probably not the place to test specific edge-cases if they do not easily fit into the 'world' data set. I feel like having the 'world' mishmash as a data source may muddle things more than it should, but it is hard to deny the benefit of not having to define a bunch of message corpuses entirely specialized for each test. 24071
head_gloda.js 623
resources
test_corrupt_database.js This test does not use glodaTestHelper because: 1) We need to do things as part of the test without gloda having remotely thought about opening the database. 2) We expect and desire that the logger produce a warning and glodaTestHelper takes the view that warnings = death. We do use the rest of the test infrastructure though. 3379
test_folder_logic.js Tests the gloda folder logic. 2247
test_fts3_tokenizer.js This test file recycles part of test_intl.js. What we do is insert into the fulltext index two messages: - one has tokens 'aa' and 'bbb', - one is from a previous test and has CJK characters in it. We want to test that the behavior of the tokenizer is as expected (namely, that it drops two-letter tokens unless they're CJK bigrams), and that GlodaMsgSearcher.sys.mjs properly drops two-letter tokens (unless CJK) from the search terms to avoid issuing a query that will definitely return no results. 9526
test_gloda_content_imap_offline.js Tests the operation of the GlodaContent (in GlodaContent.sys.mjs) and its exposure via Gloda.getMessageContent for IMAP messages that are offline. 1092
test_gloda_content_local.js Tests the operation of the GlodaContent (in GlodaContent.sys.mjs) and its exposure via Gloda.getMessageContent for local messages. 1050
test_index_addressbook.js Check that events update identity._hasAddressBookCard correctly. 4422
test_index_bad_messages.js Test that we fail on bad messages by marking the messages as bad rather than exploding or something bad like that. 6291
test_index_compaction.js Test that gloda does the right things in terms of compaction. Major cases: - Compaction occurs while we are in the process of indexing a folder. We want to make sure we stop indexing cleanly - A folder that we have already indexed gets compacted. We want to make sure that we update the message keys for all involved. This means verifying that both the on-disk representations and in-memory representations are correct. - Make sure that an indexing sweep performs a compaction pass if we kill the compaction job automatically scheduled by the conclusion of the compaction. (Simulating the user quitting before all compactions have been processed.) - Moves/deletes that happen after a compaction but before we process the compaction generate a special type of edge case that we need to check. There is also a less interesting case: - Make sure that the indexer does not try and start indexing a folder that is in the process of being compacted. 13268
test_index_junk_imap_offline.js Test indexing support for offline IMAP junk. 1465
test_index_junk_imap_online.js Test indexing support for online IMAP junk. 1013
test_index_junk_local.js Test indexing support for local junk. 980
test_index_messages_imap_offline.js Tests how well gloda indexes IMAP messages that are offline from the start. 1145
test_index_messages_imap_online.js Tests how well gloda indexes IMAP messages that aren't offline. 1116
test_index_messages_imap_online_to_offline.js Tests how well gloda indexes IMAP messages that are not offline at first, but are made offline later. 1271
test_index_messages_local.js Test indexing support for local messages. 4494
test_index_sweep_folder.js This file tests the folder indexing logic of Gloda._worker_folderIndex in the greater context of the sweep indexing mechanism in a whitebox fashion. Automated indexing is suppressed for the duration of this file. In order to test the phases of the logic we inject failures into GlodaIndexer._indexerGetEnumerator with a wrapper to control how far indexing gets. We also clobber or wrap other functions as needed. 8340
test_intl.js Sanity check our encoding transforms and make sure the mozporter tokenizer is resulting in the expected fulltext search results. Specifically: - Check that subject, body, and attachment names are properly indexed; previously we screwed up at least one of these in terms of handling encodings properly. - Check that we can fulltext search on those things afterwards. 12835
test_migration.js Test migration logic by artificially inducing or simulating the problem, then trigger the migration logic, then verify things ended up correct, including the schema version so a second pass of the logic doesn't happen. (As opposed to checking in an example of a broken database and running against that.) 5936
test_mime_attachments_size.js General testing of the byte-counting libmime facility, to make sure that what is streamed to us is actually labeled with the right size. 13650
test_mime_emitter.js General testing of the JS Mime Emitter to make sure it doesn't choke on any scenarios. We do not test, but should consider testing: - MimeEncryptedPKCS7, whatever that translates to. - apple double - sun attachment 22222
test_msg_search.js Test GlodaMsgSearcher.sys.mjs our heuristic-based fulltext search mechanism. Things we generally want to verify: - fulltext weighting by where the match happened works. - static interestingness impacts things appropriately. Our general strategy is to create two messages each with a unique string placed in controlled places and whatever intentional message manipulation is required to set things up. Then we query using a GlodaMsgSearcher with the limit set to 1. Only the message we expect should come back. Keep in mind in all tests that our underlying ranking mechanism is based on time so the date of each message is relevant but should not be significant because our score boost factor should always be well in excess of the one hour increment between messages. Previously, we relied on the general equivalence of the logic in test_query_core to our message search logic. 5913
test_noun_mimetype.js Test noun_mimetype. Exists because I just changed its implementation and I'm afraid I may have damaged it and it's hard to tell, so ironically a unit test is the easiest solution. (Don't you hate it when the right thing to do is also the easy thing to do?) 4484
test_nuke_migration.js Atypical gloda unit test that tests nuke migration. Gloda is not designed to be shutdown and started up again in the same process lifetime. It tries to be clever with caching accessors that clobber themselves out of existence which are hard to make come back to life, and probably other things. So what we do is create a global-messages-db.sqlite with an unacceptably old schema version before tickling gloda to startup. If gloda comes up with a database connection and it has the right schema version, we declare that gloda has successfully loaded. Our only historical screw-up here was very blatant (and was actually a result of trying to avoid complexity in the nuke path! oh the irony!) so we don't need to get all hardcore. 2452
test_nuke_migration_from_future.js There are actually two ways the nuke migration can be invoked. From a database too far from the future, and too far from the past. This one is the future one. We must keep ourselves safe from time-traveling grandchildren! 420
test_query_core.js Test the mechanics our query functionality. Tests in this file are intended to cover extreme boundary cases and things that are just unlikely to happen in reasonable message use-cases. (Which is to say, it could be hard to formulate a set of synthetic messages that result in the situation we want to test for.) 19572
test_query_messages_imap_offline.js Test query support for IMAP messages that were offline before they were indexed. 1064
test_query_messages_imap_online.js Test query support for IMAP messages that aren't offline. 1077
test_query_messages_imap_online_to_offline.js Test query support for IMAP messages that were indexed, then made available offline. 1165
test_query_messages_local.js Test query support for local messages. 999
test_smime_mimemsg_representation.js Test that S/MIME messages are properly displayed and that the MimeMessage representation is correct. 66484
test_startup_offline.js Test gloda starts up with indexing suppressed when offline at startup. 1796
xpcshell.ini 1048