PageRenderTime 24ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/test/ColumnFamily/ColumnFamilyTest.php

https://github.com/thobbs/phpcassa
PHP | 662 lines | 509 code | 118 blank | 35 comment | 13 complexity | 97373df402178c2530680750b0a467ae MD5 | raw file
  1. <?php
  2. use phpcassa\Connection\ConnectionPool;
  3. use phpcassa\ColumnFamily;
  4. use phpcassa\ColumnSlice;
  5. use phpcassa\Schema\DataType;
  6. use phpcassa\SystemManager;
  7. use phpcassa\Index\IndexExpression;
  8. use phpcassa\Index\IndexClause;
  9. use cassandra\ConsistencyLevel;
  10. use cassandra\NotFoundException;
  11. class ColumnFamilyTest extends PHPUnit_Framework_TestCase {
  12. private static $KEYS = array('key1', 'key2', 'key3');
  13. private static $KS = "TestColumnFamily";
  14. public static function setUpBeforeClass() {
  15. try {
  16. $sys = new SystemManager();
  17. $ksdefs = $sys->describe_keyspaces();
  18. $exists = False;
  19. foreach ($ksdefs as $ksdef)
  20. $exists = $exists || $ksdef->name == self::$KS;
  21. if ($exists)
  22. $sys->drop_keyspace(self::$KS);
  23. $sys->create_keyspace(self::$KS, array());
  24. $cfattrs = array("column_type" => "Standard");
  25. $sys->create_column_family(self::$KS, 'Standard1', $cfattrs);
  26. $sys->create_column_family(self::$KS, 'Indexed1', $cfattrs);
  27. $sys->create_index(self::$KS, 'Indexed1', 'birthdate',
  28. DataType::LONG_TYPE, 'birthday_index');
  29. $sys->close();
  30. } catch (Exception $e) {
  31. print($e);
  32. throw $e;
  33. }
  34. }
  35. public static function tearDownAfterClass() {
  36. $sys = new SystemManager();
  37. $sys->drop_keyspace(self::$KS);
  38. $sys->close();
  39. }
  40. public function setUp() {
  41. $this->pool = new ConnectionPool(self::$KS);
  42. $this->cf = new ColumnFamily($this->pool, 'Standard1');
  43. }
  44. public function tearDown() {
  45. if ($this->cf) {
  46. foreach(self::$KEYS as $key)
  47. $this->cf->remove($key);
  48. }
  49. $this->pool->dispose();
  50. }
  51. public function test_empty() {
  52. $this->setExpectedException('\cassandra\NotFoundException');
  53. $this->cf->get(self::$KEYS[0]);
  54. }
  55. public function test_insert_get() {
  56. $this->cf->insert(self::$KEYS[0], array('col' => 'val'));
  57. $this->assertEquals($this->cf->get(self::$KEYS[0]), array('col' => 'val'));
  58. }
  59. public function test_insert_get_ttl() {
  60. //Mandatory for ttl in response
  61. $this->cf->return_format = ColumnFamily::OBJECT_FORMAT;
  62. //Data
  63. $columns = array('col1' => 'val1',
  64. 'col2' => 'val2',
  65. 'col3' => 'val3');
  66. // 1st test: $ttl is an Int
  67. $ttl = 7;
  68. $this->cf->insert(self::$KEYS[0], $columns,null,$ttl);
  69. $row = $this->cf->get(self::$KEYS[0]);
  70. foreach($row as $column){
  71. $this->assertEquals($column->ttl,7);
  72. }
  73. //2nd test: $ttl is an array
  74. $ttl = array('col1' => 10,
  75. 'col3' => 12);
  76. $this->cf->insert(self::$KEYS[0], $columns,null,$ttl);
  77. $row = $this->cf->get(self::$KEYS[0]);
  78. $this->assertEquals($row[0]->ttl,10);
  79. $this->assertEquals($row[1]->ttl,NULL);
  80. $this->assertEquals($row[2]->ttl,12);
  81. }
  82. public function test_insert_multiget() {
  83. $columns1 = array('1' => 'val1', '2' => 'val2');
  84. $columns2 = array('3' => 'val1', '4' => 'val2');
  85. $this->cf->insert(self::$KEYS[0], $columns1);
  86. $this->cf->insert(self::$KEYS[1], $columns2);
  87. $rows = $this->cf->multiget(self::$KEYS);
  88. $this->assertCount(2, $rows);
  89. $this->assertEquals($rows[self::$KEYS[0]], $columns1);
  90. $this->assertEquals($rows[self::$KEYS[1]], $columns2);
  91. $this->assertNotContains(self::$KEYS[2], $rows);
  92. $keys = array();
  93. for ($i = 0; $i < 100; $i++)
  94. $keys[] = "key" + (string)$i;
  95. foreach ($keys as $key) {
  96. $this->cf->insert($key, $columns1);
  97. }
  98. shuffle($keys);
  99. $rows = $this->cf->multiget($keys);
  100. $this->assertCount(100, $rows);
  101. $i = 0;
  102. foreach ($rows as $key => $cols) {
  103. $this->assertEquals($key, $keys[$i]);
  104. $i++;
  105. }
  106. foreach ($keys as $key) {
  107. $this->cf->remove($key);
  108. }
  109. }
  110. public function test_batch_insert() {
  111. $columns1 = array('1' => 'val1', '2' => 'val2');
  112. $columns2 = array('3' => 'val1', '4' => 'val2');
  113. $rows = array(self::$KEYS[0] => $columns1,
  114. self::$KEYS[1] => $columns2);
  115. $this->cf->batch_insert($rows);
  116. $rows = $this->cf->multiget(self::$KEYS);
  117. $this->assertCount(2, $rows);
  118. $this->assertEquals($rows[self::$KEYS[0]], $columns1);
  119. $this->assertEquals($rows[self::$KEYS[1]], $columns2);
  120. $this->assertNotContains(self::$KEYS[2], $rows);
  121. }
  122. public function test_batch_insert_ttl() {
  123. //Mandatory for ttl in response
  124. $this->cf->return_format = ColumnFamily::OBJECT_FORMAT;
  125. // 1st test: $ttl is an Integer
  126. $columns1 = array('1' => 'val1', '2' => 'val2');
  127. $columns2 = array('3' => 'val1', '4' => 'val2');
  128. $rows = array(self::$KEYS[0] => $columns1,
  129. self::$KEYS[1] => $columns2);
  130. $this->cf->batch_insert($rows,null,5);
  131. $rows = $this->cf->multiget(self::$KEYS);
  132. $this->assertCount(2, $rows);
  133. foreach ($rows as $objectRow){
  134. $key = $objectRow[0];
  135. foreach ($objectRow[1] as $column){
  136. $this->assertEquals($column->ttl,5);
  137. }
  138. }
  139. //2nd test: $ttl is an Array
  140. $rows = array(self::$KEYS[0] => $columns1,
  141. self::$KEYS[1] => $columns2);
  142. $ttlArray = array(self::$KEYS[0] => 10, self::$KEYS[1] => 15);
  143. $this->cf->batch_insert($rows,NULL,$ttlArray);
  144. $rows = $this->cf->multiget(self::$KEYS);
  145. $this->assertCount(2, $rows);
  146. foreach ($rows as $objectRow){
  147. $key = $objectRow[0];
  148. foreach ($objectRow[1] as $column){
  149. if($key == self::$KEYS[0])
  150. $this->assertEquals($column->ttl,10);
  151. if($key == self::$KEYS[1])
  152. $this->assertEquals($column->ttl,15);
  153. }
  154. }
  155. }
  156. public function test_insert_get_count() {
  157. $cols = array('1' => 'val1', '2' => 'val2');
  158. $this->cf->insert(self::$KEYS[0], $cols);
  159. $this->assertEquals($this->cf->get_count(self::$KEYS[0]), 2);
  160. $column_slice = new ColumnSlice('1');
  161. $this->assertEquals($this->cf->get_count(self::$KEYS[0], $column_slice), 2);
  162. $column_slice = new ColumnSlice('', '2');
  163. $this->assertEquals($this->cf->get_count(self::$KEYS[0], $column_slice), 2);
  164. $column_slice = new ColumnSlice('1', '2');
  165. $this->assertEquals($this->cf->get_count(self::$KEYS[0], $column_slice), 2);
  166. $column_slice = new ColumnSlice('1', '1');
  167. $this->assertEquals($this->cf->get_count(self::$KEYS[0], $column_slice), 1);
  168. $this->assertEquals($this->cf->get_count(self::$KEYS[0], null, array('1', '2')), 2);
  169. $this->assertEquals($this->cf->get_count(self::$KEYS[0], null, array('1')), 1);
  170. // check that the default limit of 100 isn't applied here
  171. $cols = array();
  172. foreach (range(1, 110) as $i)
  173. $cols[(string)$i] = (string)$i;
  174. $this->cf->insert(self::$KEYS[0], $cols);
  175. $this->assertEquals(110, $this->cf->get_count(self::$KEYS[0]));
  176. }
  177. private function multiget_slice_helper($start, $finish, $expected) {
  178. $column_slice = new ColumnSlice($start, $finish);
  179. $result = $this->cf->multiget_count(self::$KEYS, $column_slice);
  180. $this->assertCount(3, $result);
  181. $this->assertEquals($result[self::$KEYS[0]], $expected);
  182. }
  183. public function test_insert_multiget_count() {
  184. $columns = array('1' => 'val1', '2' => 'val2');
  185. foreach(self::$KEYS as $key)
  186. $this->cf->insert($key, $columns);
  187. $result = $this->cf->multiget_count(self::$KEYS);
  188. foreach(self::$KEYS as $key)
  189. $this->assertEquals($result[$key], 2);
  190. $column_slice = new ColumnSlice('1');
  191. $result = $this->cf->multiget_count(self::$KEYS, $column_slice);
  192. $this->assertCount(3, $result);
  193. $this->assertEquals($result[self::$KEYS[0]], 2);
  194. $this->multiget_slice_helper('', '2', 2);
  195. $this->multiget_slice_helper('1', '2', 2);
  196. $this->multiget_slice_helper('1', '1', 1);
  197. $result = $this->cf->multiget_count(self::$KEYS, null, array('1', '2'));
  198. $this->assertCount(3, $result);
  199. $this->assertEquals($result[self::$KEYS[0]], 2);
  200. $result = $this->cf->multiget_count(self::$KEYS, null, array('1'));
  201. $this->assertCount(3, $result);
  202. $this->assertEquals($result[self::$KEYS[0]], 1);
  203. // Test that multiget_count preserves the key order
  204. $columns = array('1' => 'val1', '2' => 'val2');
  205. $keys = array();
  206. for ($i = 0; $i < 100; $i++)
  207. $keys[] = "key" + (string)$i;
  208. foreach ($keys as $key) {
  209. $this->cf->insert($key, $columns);
  210. }
  211. shuffle($keys);
  212. $rows = $this->cf->multiget_count($keys);
  213. $this->assertCount(100, $rows);
  214. $i = 0;
  215. foreach ($rows as $key => $count) {
  216. $this->assertEquals($key, $keys[$i]);
  217. $i++;
  218. }
  219. foreach ($keys as $key) {
  220. $this->cf->remove($key);
  221. }
  222. }
  223. protected static function endswith($haystack, $needle) {
  224. $start = strlen($needle) * -1; //negative
  225. return (substr($haystack, $start) === $needle);
  226. }
  227. protected function require_opp() {
  228. $partitioner = $this->pool->call('describe_partitioner');
  229. if ($this->endswith($partitioner, "RandomPartitioner") ||
  230. $this->endswith($partitioner, "Murmur3Partitioner")) {
  231. $this->markTestSkipped();
  232. }
  233. }
  234. public function test_insert_get_range() {
  235. $this->require_opp();
  236. $cl = ConsistencyLevel::ONE;
  237. $cf = new ColumnFamily($this->pool,
  238. 'Standard1', true, true,
  239. $read_consistency_level=$cl,
  240. $write_consistency_level=$cl,
  241. $buffer_size=10);
  242. $keys = array();
  243. $columns = array('c' => 'v');
  244. foreach (range(100, 200) as $i) {
  245. $keys[] = 'key'.$i;
  246. $cf->insert('key'.$i, $columns);
  247. }
  248. # Keys at the end that we don't want
  249. foreach (range(201, 300) as $i)
  250. $cf->insert('key'.$i, $columns);
  251. # Buffer size = 10; rowcount is divisible by buffer size
  252. $count = 0;
  253. foreach ($cf->get_range() as $key => $cols) {
  254. $this->assertContains($key, $keys);
  255. unset($keys[$key]);
  256. $count++;
  257. }
  258. $this->assertEquals($count, 100);
  259. # Fetch a single row
  260. $count = 0;
  261. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=1) as $key => $cols) {
  262. $this->assertContains($key, array($keys[0]));
  263. $count++;
  264. }
  265. $this->assertEquals(1, $count);
  266. # Buffer size larger than row count
  267. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  268. $read_consistency_level=$cl, $write_consistency_level=$cl,
  269. $buffer_size=1000);
  270. $count = 0;
  271. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=100) as $key => $cols) {
  272. $this->assertContains($key, $keys);
  273. unset($keys[$key]);
  274. $count++;
  275. }
  276. $this->assertEquals($count, 100);
  277. # Buffer size larger than row count, less than total number of rows
  278. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  279. $read_consistency_level=$cl, $write_consistency_level=$cl,
  280. $buffer_size=150);
  281. $count = 0;
  282. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=100) as $key => $cols) {
  283. $this->assertContains($key, $keys);
  284. unset($keys[$key]);
  285. $count++;
  286. }
  287. $this->assertEquals($count, 100);
  288. # Odd number for batch size
  289. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  290. $read_consistency_level=$cl,
  291. $write_consistency_level=$cl,
  292. $buffer_size=7);
  293. $count = 0;
  294. $rows = $cf->get_range($key_start='', $key_finish='', $row_count=100);
  295. foreach ($rows as $key => $cols) {
  296. $this->assertContains($key, $keys);
  297. unset($keys[$key]);
  298. $count++;
  299. }
  300. $this->assertEquals($count, 100);
  301. # Smallest buffer size available
  302. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  303. $read_consistency_level=$cl,
  304. $write_consistency_level=$cl,
  305. $buffer_size=2);
  306. $count = 0;
  307. $rows = $cf->get_range($key_start='', $key_finish='', $row_count=100);
  308. foreach ($rows as $key => $cols) {
  309. $this->assertContains($key, $keys);
  310. unset($keys[$key]);
  311. $count++;
  312. }
  313. $this->assertEquals($count, 100);
  314. # Put the remaining keys in our list
  315. foreach (range(201, 300) as $i)
  316. $keys[] = 'key'.$i;
  317. # Row count above total number of rows
  318. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  319. $read_consistency_level=$cl, $write_consistency_level=$cl,
  320. $buffer_size=2);
  321. $count = 0;
  322. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=10000) as $key => $cols) {
  323. $this->assertContains($key, $keys);
  324. unset($keys[$key]);
  325. $count++;
  326. }
  327. $this->assertEquals($count, 201);
  328. # Row count above total number of rows
  329. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  330. $read_consistency_level=$cl, $write_consistency_level=$cl,
  331. $buffer_size=7);
  332. $count = 0;
  333. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=10000) as $key => $cols) {
  334. $this->assertContains($key, $keys);
  335. unset($keys[$key]);
  336. $count++;
  337. }
  338. $this->assertEquals($count, 201);
  339. # Row count above total number of rows, buffer_size = total number of rows
  340. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  341. $read_consistency_level=$cl, $write_consistency_level=$cl,
  342. $buffer_size=201);
  343. $count = 0;
  344. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=10000) as $key => $cols) {
  345. $this->assertContains($key, $keys);
  346. unset($keys[$key]);
  347. $count++;
  348. }
  349. $this->assertEquals($count, 201);
  350. # Row count above total number of rows, buffer_size > total number of rows
  351. $cf = new ColumnFamily($this->pool, 'Standard1', true, true,
  352. $read_consistency_level=$cl, $write_consistency_level=$cl,
  353. $buffer_size=10000);
  354. $count = 0;
  355. foreach ($cf->get_range($key_start='', $key_finish='', $row_count=10000) as $key => $cols) {
  356. $this->assertContains($key, $keys);
  357. unset($keys[$key]);
  358. $count++;
  359. }
  360. $this->assertEquals($count, 201);
  361. $cf->truncate();
  362. }
  363. public function test_batched_get_indexed_slices() {
  364. $this->require_opp();
  365. $cl = ConsistencyLevel::ONE;
  366. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  367. $read_consistency_level=$cl, $write_consistency_level=$cl,
  368. $buffer_size=10);
  369. $cf->truncate();
  370. $keys = array();
  371. $columns = array('birthdate' => 1);
  372. foreach (range(100, 200) as $i) {
  373. $keys[] = 'key'.$i;
  374. $cf->insert('key'.$i, $columns);
  375. }
  376. # Keys at the end that we don't want
  377. foreach (range(201, 300) as $i)
  378. $cf->insert('key'.$i, $columns);
  379. $expr = new IndexExpression($column_name='birthdate', $value=1);
  380. $clause = new IndexClause(array($expr), 100);
  381. # Buffer size = 10; rowcount is divisible by buffer size
  382. $count = 0;
  383. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  384. $this->assertContains($key, $keys);
  385. unset($keys[$key]);
  386. $count++;
  387. }
  388. $this->assertEquals($count, 100);
  389. # Buffer size larger than row count
  390. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  391. $read_consistency_level=$cl, $write_consistency_level=$cl,
  392. $buffer_size=1000);
  393. $count = 0;
  394. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  395. $this->assertContains($key, $keys);
  396. unset($keys[$key]);
  397. $count++;
  398. }
  399. $this->assertEquals($count, 100);
  400. # Buffer size larger than row count, less than total number of rows
  401. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  402. $read_consistency_level=$cl, $write_consistency_level=$cl,
  403. $buffer_size=150);
  404. $count = 0;
  405. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  406. $this->assertContains($key, $keys);
  407. unset($keys[$key]);
  408. $count++;
  409. }
  410. $this->assertEquals($count, 100);
  411. # Odd number for batch size
  412. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  413. $read_consistency_level=$cl, $write_consistency_level=$cl,
  414. $buffer_size=7);
  415. $count = 0;
  416. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  417. $this->assertContains($key, $keys);
  418. unset($keys[$key]);
  419. $count++;
  420. }
  421. $this->assertEquals($count, 100);
  422. # Smallest buffer size available
  423. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  424. $read_consistency_level=$cl, $write_consistency_level=$cl,
  425. $buffer_size=2);
  426. $count = 0;
  427. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  428. $this->assertContains($key, $keys);
  429. unset($keys[$key]);
  430. $count++;
  431. }
  432. $this->assertEquals($count, 100);
  433. # Put the remaining keys in our list
  434. foreach (range(201, 300) as $i)
  435. $keys[] = 'key'.$i;
  436. # Row count above total number of rows
  437. $clause->count = 10000;
  438. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  439. $read_consistency_level=$cl, $write_consistency_level=$cl,
  440. $buffer_size=2);
  441. $count = 0;
  442. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  443. $this->assertContains($key, $keys);
  444. unset($keys[$key]);
  445. $count++;
  446. }
  447. $this->assertEquals($count, 201);
  448. # Row count above total number of rows
  449. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  450. $read_consistency_level=$cl, $write_consistency_level=$cl,
  451. $buffer_size=7);
  452. $count = 0;
  453. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  454. $this->assertContains($key, $keys);
  455. unset($keys[$key]);
  456. $count++;
  457. }
  458. $this->assertEquals($count, 201);
  459. # Row count above total number of rows, buffer_size = total number of rows
  460. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  461. $read_consistency_level=$cl, $write_consistency_level=$cl,
  462. $buffer_size=200);
  463. $count = 0;
  464. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  465. $this->assertContains($key, $keys);
  466. unset($keys[$key]);
  467. $count++;
  468. }
  469. $this->assertEquals($count, 201);
  470. # Row count above total number of rows, buffer_size = total number of rows
  471. $cf = new ColumnFamily($this->pool, 'Indexed1', true, true,
  472. $read_consistency_level=$cl, $write_consistency_level=$cl,
  473. $buffer_size=10000);
  474. $count = 0;
  475. foreach ($cf->get_indexed_slices($clause) as $key => $cols) {
  476. $this->assertContains($key, $keys);
  477. unset($keys[$key]);
  478. $count++;
  479. }
  480. $this->assertEquals($count, 201);
  481. $cf->truncate();
  482. }
  483. public function test_get_indexed_slices() {
  484. $this->require_opp();
  485. $indexed_cf = new ColumnFamily($this->pool, 'Indexed1');
  486. $indexed_cf->truncate();
  487. $columns = array('birthdate' => 1);
  488. foreach(range(1,3) as $i)
  489. $indexed_cf->insert('key'.$i, $columns);
  490. $expr = new IndexExpression($column_name='birthdate', $value=1);
  491. $clause = new IndexClause(array($expr), 10000);
  492. $result = $indexed_cf->get_indexed_slices($clause);
  493. $count = 0;
  494. foreach($result as $key => $cols) {
  495. $count++;
  496. $this->assertEquals($columns, $cols);
  497. $this->assertEquals($key, "key$count");
  498. }
  499. $this->assertEquals($count, 3);
  500. # Insert and remove a matching row at the beginning
  501. $indexed_cf->insert('key0', $columns);
  502. $indexed_cf->remove('key0');
  503. # Insert and remove a matching row at the end
  504. $indexed_cf->insert('key4', $columns);
  505. $indexed_cf->remove('key4');
  506. # Remove a matching row from the middle
  507. $indexed_cf->remove('key2');
  508. $result = $indexed_cf->get_indexed_slices($clause);
  509. $count = 0;
  510. foreach($result as $key => $cols) {
  511. $count++;
  512. $this->assertContains($key, array("key1", "key3"));
  513. }
  514. $this->assertEquals($count, 2);
  515. $indexed_cf->truncate();
  516. $keys = array();
  517. foreach(range(1,1000) as $i) {
  518. $indexed_cf->insert("key$i", $columns);
  519. if ($i % 50 != 0)
  520. $indexed_cf->remove("key$i");
  521. else
  522. $keys[] = "key$i";
  523. }
  524. $count = 0;
  525. foreach($result as $key => $cols) {
  526. $count++;
  527. $this->assertContains($key, $keys);
  528. unset($keys[$key]);
  529. }
  530. $this->assertEquals($count, 20);
  531. $indexed_cf->truncate();
  532. }
  533. public function test_remove() {
  534. $columns = array('1' => 'val1', '2' => 'val2');
  535. $this->cf->insert(self::$KEYS[0], $columns);
  536. $this->assertEquals($this->cf->get(self::$KEYS[0]), $columns);
  537. $this->cf->remove(self::$KEYS[0], array('2'));
  538. unset($columns['2']);
  539. $this->assertEquals($this->cf->get(self::$KEYS[0]), $columns);
  540. $this->cf->remove(self::$KEYS[0]);
  541. $this->setExpectedException('\cassandra\NotFoundException');
  542. $this->cf->get(self::$KEYS[0]);
  543. }
  544. }