@@ -1374,126 +1374,126 @@ Feature: Driver Query
13741374 Given transaction closes
13751375
13761376
1377- # Scenario: Driver processes query errors correctly
1378- # Given connection open schema transaction for database: typedb
1379- # Then typeql schema query; fails
1380- # """
1381- # """
1382- # Then typeql schema query; fails
1383- # """
1384- #
1385- # """
1386- # Then typeql read query; fails with a message containing: "Error analysing query"
1387- # """
1388- # match $r label non-existing;
1389- # """
1390- # Then typeql schema query; fails with a message containing: "Query parsing failed"
1391- # """
1392- # define entity entity;
1393- # """
1394- # Then typeql schema query; fails with a message containing: "Failed to execute define query"
1395- # """
1396- # define attribute name owns name;
1397- # """
1398- #
1399- # Scenario: Driver can concurrently process read queries without interruptions
1400- # Given connection open schema transaction for database: typedb
1401- # Given typeql schema query
1402- # """
1403- # define
1404- # entity person0;
1405- # entity person1;
1406- # entity person2;
1407- # entity person3;
1408- # entity person4;
1409- # entity person5;
1410- # entity person6;
1411- # entity person7;
1412- # entity person8;
1413- # entity person9;
1414- # """
1415- # When concurrently get answers of typeql read query 10 times
1416- # """
1417- # match entity $p;
1418- # """
1419- # Then concurrently process 1 row from answers
1420- # Then concurrently process 1 row from answers
1421- # Then concurrently process 3 rows from answers
1422- # When get answers of typeql read query
1423- # """
1424- # match entity $p;
1425- # """
1426- # Then answer size is: 10
1427- # Then concurrently process 5 rows from answers
1428- # Then concurrently process 1 row from answers; fails
1429- #
1430- #
1431- # Scenario: Driver's concurrent processing of read queries answers is not interrupted by schema queries if answers are prefetched
1432- # Given connection open schema transaction for database: typedb
1433- # Given typeql schema query
1434- # """
1435- # define
1436- # entity person0;
1437- # entity person1;
1438- # entity person2;
1439- # entity person3;
1440- # entity person4;
1441- # entity person5;
1442- # entity person6;
1443- # entity person7;
1444- # entity person8;
1445- # entity person9;
1446- # """
1447- # When concurrently get answers of typeql read query 10 times
1448- # """
1449- # match entity $p;
1450- # """
1451- # Then concurrently process 1 row from answers
1452- # Then concurrently process 1 row from answers
1453- # Then concurrently process 3 rows from answers
1454- # When typeql schema query
1455- # """
1456- # define entity person10;
1457- # """
1458- # Then concurrently process 1 rows from answers
1459- # Then concurrently process 3 rows from answers
1460- # Then concurrently process 1 rows from answers
1461- # Then concurrently process 1 row from answers; fails
1462- #
1463- #
1464- # Scenario: Driver's concurrent processing of read queries answers is interrupted by schema queries if answers are not prefetched
1465- # Given connection open schema transaction for database: typedb
1466- # Given typeql schema query
1467- # """
1468- # define
1469- # entity person0;
1470- # entity person1;
1471- # entity person2;
1472- # entity person3;
1473- # entity person4;
1474- # entity person5;
1475- # entity person6;
1476- # entity person7;
1477- # entity person8;
1478- # entity person9;
1479- # """
1480- # When concurrently get answers of typeql read query 10 times
1481- # """
1482- # match entity $p;
1483- # """
1484- # Then concurrently process 1 row from answers
1485- # Then concurrently process 1 row from answers
1486- # Then concurrently process 3 rows from answers
1487- # When typeql schema query
1488- # """
1489- # define entity person10;
1490- # """
1491- # # TODO: Uncomment this when we can set prefetch sizes to 0
1492- ## Then concurrently process 1 rows from answers; fails
1493- #
1494- #
1495- ## TODO: Repeat two tests above for:
1496- ## read results + write query (not) interrupting them
1497- ## write results + schema query (not) interrupting them
1498- ## write results + write query (not) interrupting them
1499- ## Consider adding tests for commit, rollback, and close doing the same!
1377+ Scenario : Driver processes query errors correctly
1378+ Given connection open schema transaction for database: typedb
1379+ Then typeql schema query; fails
1380+ """
1381+ """
1382+ Then typeql schema query; fails
1383+ """
1384+
1385+ """
1386+ Then typeql read query; fails with a message containing: "Error analysing query"
1387+ """
1388+ match $r label non-existing;
1389+ """
1390+ Then typeql schema query; fails with a message containing: "Query parsing failed"
1391+ """
1392+ define entity entity;
1393+ """
1394+ Then typeql schema query; fails with a message containing: "Failed to execute define query"
1395+ """
1396+ define attribute name owns name;
1397+ """
1398+
1399+ Scenario : Driver can concurrently process read queries without interruptions
1400+ Given connection open schema transaction for database: typedb
1401+ Given typeql schema query
1402+ """
1403+ define
1404+ entity person0;
1405+ entity person1;
1406+ entity person2;
1407+ entity person3;
1408+ entity person4;
1409+ entity person5;
1410+ entity person6;
1411+ entity person7;
1412+ entity person8;
1413+ entity person9;
1414+ """
1415+ When concurrently get answers of typeql read query 10 times
1416+ """
1417+ match entity $p;
1418+ """
1419+ Then concurrently process 1 row from answers
1420+ Then concurrently process 1 row from answers
1421+ Then concurrently process 3 rows from answers
1422+ When get answers of typeql read query
1423+ """
1424+ match entity $p;
1425+ """
1426+ Then answer size is: 10
1427+ Then concurrently process 5 rows from answers
1428+ Then concurrently process 1 row from answers; fails
1429+
1430+
1431+ Scenario : Driver's concurrent processing of read queries answers is not interrupted by schema queries if answers are prefetched
1432+ Given connection open schema transaction for database: typedb
1433+ Given typeql schema query
1434+ """
1435+ define
1436+ entity person0;
1437+ entity person1;
1438+ entity person2;
1439+ entity person3;
1440+ entity person4;
1441+ entity person5;
1442+ entity person6;
1443+ entity person7;
1444+ entity person8;
1445+ entity person9;
1446+ """
1447+ When concurrently get answers of typeql read query 10 times
1448+ """
1449+ match entity $p;
1450+ """
1451+ Then concurrently process 1 row from answers
1452+ Then concurrently process 1 row from answers
1453+ Then concurrently process 3 rows from answers
1454+ When typeql schema query
1455+ """
1456+ define entity person10;
1457+ """
1458+ Then concurrently process 1 rows from answers
1459+ Then concurrently process 3 rows from answers
1460+ Then concurrently process 1 rows from answers
1461+ Then concurrently process 1 row from answers; fails
1462+
1463+
1464+ Scenario : Driver's concurrent processing of read queries answers is interrupted by schema queries if answers are not prefetched
1465+ Given connection open schema transaction for database: typedb
1466+ Given typeql schema query
1467+ """
1468+ define
1469+ entity person0;
1470+ entity person1;
1471+ entity person2;
1472+ entity person3;
1473+ entity person4;
1474+ entity person5;
1475+ entity person6;
1476+ entity person7;
1477+ entity person8;
1478+ entity person9;
1479+ """
1480+ When concurrently get answers of typeql read query 10 times
1481+ """
1482+ match entity $p;
1483+ """
1484+ Then concurrently process 1 row from answers
1485+ Then concurrently process 1 row from answers
1486+ Then concurrently process 3 rows from answers
1487+ When typeql schema query
1488+ """
1489+ define entity person10;
1490+ """
1491+ # TODO: Uncomment this when we can set prefetch sizes to 0
1492+ # Then concurrently process 1 rows from answers; fails
1493+
1494+
1495+ # TODO: Repeat two tests above for:
1496+ # read results + write query (not) interrupting them
1497+ # write results + schema query (not) interrupting them
1498+ # write results + write query (not) interrupting them
1499+ # Consider adding tests for commit, rollback, and close doing the same!
0 commit comments