(self)
| 77 | return value |
| 78 | |
| 79 | def checkDbms(self): |
| 80 | if not conf.extensiveFp and Backend.isDbmsWithin(H2_ALIASES): |
| 81 | setDbms("%s %s" % (DBMS.H2, Backend.getVersion())) |
| 82 | |
| 83 | self.getBanner() |
| 84 | |
| 85 | return True |
| 86 | |
| 87 | infoMsg = "testing %s" % DBMS.H2 |
| 88 | logger.info(infoMsg) |
| 89 | |
| 90 | result = inject.checkBooleanExpression("ZERO()=0") |
| 91 | |
| 92 | if result: |
| 93 | infoMsg = "confirming %s" % DBMS.H2 |
| 94 | logger.info(infoMsg) |
| 95 | |
| 96 | result = inject.checkBooleanExpression("LEAST(ROUNDMAGIC(PI()),3)=3") |
| 97 | |
| 98 | if not result: |
| 99 | warnMsg = "the back-end DBMS is not %s" % DBMS.H2 |
| 100 | logger.warning(warnMsg) |
| 101 | |
| 102 | return False |
| 103 | else: |
| 104 | setDbms(DBMS.H2) |
| 105 | |
| 106 | result = inject.checkBooleanExpression("JSON_OBJECT() IS NOT NULL") |
| 107 | version = '2' if result else '1' |
| 108 | Backend.setVersion(version) |
| 109 | |
| 110 | self.getBanner() |
| 111 | |
| 112 | return True |
| 113 | else: |
| 114 | warnMsg = "the back-end DBMS is not %s" % DBMS.H2 |
| 115 | logger.warning(warnMsg) |
| 116 | |
| 117 | return False |
| 118 | |
| 119 | def getHostname(self): |
| 120 | warnMsg = "on H2 it is not possible to enumerate the hostname" |
nothing calls this directly
no test coverage detected