A resource that cannot be read fails with a message naming the file
All 3 scenarios hold
The two ways loading can fail: the path resolves to nothing, or the file resolves but the declared encoding cannot decode it. Both raise the same exception type, so the message is what tells the two apart.
expected outcome
broken scenario
| Scenario | Resource path | Encoding | Throws? | Error message? |
|---|---|---|---|---|
| No such file anywhere | no_such.table | UTF-8 | org.tabletest.junit.TableTestException | External table file no_such.table not found, searched the classpath relative to org.tabletest.junit.features.JavaExternalTableTest and from the root |
| Subfolder file misspelt | subfolder/x | UTF-8 | org.tabletest.junit.TableTestException | External table file subfolder/x not found, searched the classpath relative to org.tabletest.junit.features.JavaExternalTableTest and from the root |
| Encoding does not exist | external.table | Latin-42 | org.tabletest.junit.TableTestException | Failed to read table from external file external.table using encoding Latin-42 |