Add a little more unit test documentation, fail loudly when isolation prevents a

query

Summary:
  - Provide an example unit test, and document it.
  - Document database isolation better.
  - When we issue an unsimulated query to the isolated connection, throw a
helpful message.
  - Pygments is complaining about my madeup "lang=demo", change it to
"lang=text".

Test Plan:
  - Ran the unit test (sanity check).
  - Ran all other unit tests (verify I didn't break isolation).
  - Added a queryfx(..., 'SELECT 1') to a test and verified it throws.
  - Read the documentation.

Reviewed By: edward
Reviewers: edward, jungejason, tuomaspelkonen, aran
CC: aran, edward
Differential Revision: 773
This commit is contained in:
epriestley
2011-08-03 08:17:53 -07:00
parent 977a6dcf86
commit 29444d1df3
7 changed files with 122 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ This produces headers like the ones in this document.
Make **lists** by indenting two spaces and beginning each item with a "-":
lang=demo
lang=text
- milk
- eggs
- bread
@@ -51,7 +51,7 @@ Make **code blocks** by indenting two spaces:
You can specify a language for syntax highlighting with "lang=xxx":
lang=demo
lang=text
lang=html
<a href="#">...</a>
@@ -64,7 +64,7 @@ available (in most cases, this means you need to configure Pygments):
You can also use a "COUNTEREXAMPLE" header to show that a block of code is
bad and shouldn't be copied:
lang=demo
lang=text
COUNTEREXAMPLE
function f() {
global $$variable_variable;