@@ -42,20 +42,31 @@ To help with finding errors/bugs when tests fail, there are several things to fi
-**Look closely**. Analyze the error message closely, and possible any previous error message(s) that could have caused the test to fail.
-**Focus on single error**
- To only inspect one test, mark them with `@Tag("New")` and use the gradle task "newTests".
- Use `Assumptions.assumeTrue(false);` to abort unneeded test cases early.
- When editing RagConnect itself and force recreating source for the affected test, e.g., `compileForwardingIncremental.outputs.upToDateWhen { false }`
- _Remember to undo all changes, once the bug is fixed._
-**Activate logs**. Add the following to the `ragconnect` specification of the compile-task of the affected test:
```
logReads = true
logWrites = true
logIncremental = true
```
_Remember to remove those lines, once the bug is fixed._
-**Trace incremental events**. Add the following right after create the root node (named `model` here):
```java
model.trace().setReceiver(TestUtils::logEvent);
```
This will output every event fired by the incremental evaluation engine. _Remember to remove this line, once the bug is fixed._
- To only inspect one test, mark them with `@Tag("New")` and use the gradle task "newTests".
- Use `Assumptions.assumeTrue(false);` to abort unneeded test cases early.
- When editing RagConnect itself and force recreating source for the affected test, e.g., `compileForwardingIncremental.outputs.upToDateWhen { false }`
- _Remember to undo all changes, once the bug is fixed._
-**Activate logs**. Activate logging in the `ragconnect` specification of the compile-task of the affected test:
- _Remember to remove those lines, once the bug is fixed._
```groovy
taskcompile(type:RagConnectTest){
ragconnect{
// ... other parameters ...
logReads=true
logWrites=true
logIncremental=true
}
// ... other tools ...
}
```
-**Trace incremental events**. Add a receiver right after creation of the root node (named `model` here)
- This will output every event fired by the incremental evaluation engine.
- _Remember to remove this line, once the bug is fixed._
```java
model.trace().setReceiver(TestUtils::logEvent);
```
-**Add log statements**. As there will be quite some log output, add some identifying log statement (i.e., using `logger.fatal("---")`) right before the suspicious statement to inspect only the relevant log message after that.