[TESTS] Fix GetResultTests.testGetSourceAsBytes() (#22524)
The document in the randomized GetResult can exist with no source (like if the _source was disabled in mappings), that's why the test should not always expect a non null source when the doc exists.
This commit is contained in:
parent
433c822d4f
commit
b9061c1cc9
|
@ -83,7 +83,7 @@ public class GetResultTests extends ESTestCase {
|
|||
XContentType xContentType = randomFrom(XContentType.values());
|
||||
Tuple<GetResult, GetResult> tuple = randomGetResult(xContentType);
|
||||
GetResult getResult = tuple.v1();
|
||||
if (getResult.isExists()) {
|
||||
if (getResult.isExists() && getResult.isSourceEmpty() == false) {
|
||||
assertNotNull(getResult.sourceRef());
|
||||
} else {
|
||||
assertNull(getResult.sourceRef());
|
||||
|
|
Loading…
Reference in New Issue