示例#1
0
    def testCreateTableNameEmpty(self):
        """

        table名为空
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table, name='')
        retStatus = jobHelper.run(failonerror=False)
        self.assertFalse(retStatus)
示例#2
0
文件: sut_scan.py 项目: zuston/fedb
    def testScanPkInvalid(self):
        """

        不存在的partition_key进行scan
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table)
        jobHelper.append(jobHelper.rtidbClient.put, pk='123')
        jobHelper.append(jobHelper.rtidbClient.scan, pk='456')
        retStatus = jobHelper.run(failonerror=False, autoidentity=False)
        self.assertTrue(retStatus)
        self.assertEqual(0, len(jobHelper.scanout_message()))
示例#3
0
文件: sut_scan.py 项目: zuston/fedb
    def testScanTidInvalid(self):
        """

        table_id不存在的表进行scan
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table, tid=123)
        jobHelper.append(jobHelper.rtidbClient.put, tid=123)
        jobHelper.append(jobHelper.rtidbClient.scan, tid=456)
        retStatus = jobHelper.run(autoidentity=False, logcheck=False)
        self.assertTrue(retStatus)
        self.assertEqual(0, len(jobHelper.scanout_message()))
示例#4
0
文件: sut_scan.py 项目: zuston/fedb
    def testScanEtimeEmpty(self):
        """

        timestamp_end为空
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table)
        jobHelper.append(jobHelper.rtidbClient.put)
        jobHelper.append(jobHelper.rtidbClient.scan, etime=0)
        retStatus = jobHelper.run(failonerror=False, autoidentity=False)
        self.assertTrue(retStatus)
        self.assertEqual(1, len(jobHelper.scanout_message()))
示例#5
0
    def testCreateTablePid0(self):
        """

        pid=0
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table, pid=0)
        jobHelper.append(jobHelper.rtidbClient.put)
        jobHelper.append(jobHelper.rtidbClient.scan)
        retStatus = jobHelper.run()
        self.assertTrue(retStatus)
示例#6
0
文件: sut_scan.py 项目: zuston/fedb
    def testScanCommon(self):
        """

        scan操作,正确处理
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table)
        jobHelper.append(jobHelper.rtidbClient.put)
        jobHelper.append(jobHelper.rtidbClient.scan)
        retStatus = jobHelper.run()
        self.assertTrue(retStatus)
示例#7
0
    def testCreateTablePidMax(self):
        """

        pid=max
        """
        jobHelper = JobHelper()
        import sys
        jobHelper.append(jobHelper.rtidbClient.create_table, pid=sys.maxint)
        jobHelper.append(jobHelper.rtidbClient.put, pid=sys.maxint)
        jobHelper.append(jobHelper.rtidbClient.scan, pid=sys.maxint)
        retStatus = jobHelper.run()
        self.assertTrue(retStatus)
示例#8
0
    def testCreateTableSameToken(self):
        """

        table名,table_id,partion_id,segment_count配相同数字
        """
        jobHelper = JobHelper()
        import sys
        jobHelper.append(jobHelper.rtidbClient.create_table,
                         name='123',
                         tid=123,
                         pid=123)
        jobHelper.append(jobHelper.rtidbClient.put, tid=123, pid=123)
        jobHelper.append(jobHelper.rtidbClient.scan, tid=123, pid=123)
        retStatus = jobHelper.run()
        self.assertTrue(retStatus)
示例#9
0
    def testCreateTableNameDuplicate(self):
        """

        已经存在的table名,再次执行create操作失败
        """
        jobHelper = JobHelper()
        jobHelper.append(jobHelper.rtidbClient.create_table,
                         name='table_duplacate')
        jobHelper.append(jobHelper.rtidbClient.create_table,
                         name='table_duplacate')
        retStatus = jobHelper.run(failonerror=False)
        self.assertFalse(retStatus)