From 034d1dc9f8615406d246f84635750d3090e8c727 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Mon, 10 Feb 2014 13:03:11 -0500 Subject: [PATCH 1/6] Unit test docs update --- airtime_mvc/tests/README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/tests/README.txt b/airtime_mvc/tests/README.txt index 6c7256799..a469027d0 100644 --- a/airtime_mvc/tests/README.txt +++ b/airtime_mvc/tests/README.txt @@ -3,8 +3,8 @@ To get the Airtime unit tests running: 1) Install PHPUnit -We explicitly install PHPUnit 3.4 because that's as a new of a version -as is supported by Zend Framework 1: +We explicitly install PHPUnit 3.4 because that the most recent version +that's still supported by Zend Framework 1: sudo pear channel-discover pear.phpunit.de sudo pear channel-discover pear.symfony.com From 36d6a6b2bff77460896b2246beaf4bca9ab4099d Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Mon, 10 Feb 2014 13:18:28 -0500 Subject: [PATCH 2/6] Dummy commit to test web hook --- airtime_mvc/tests/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/tests/README.txt b/airtime_mvc/tests/README.txt index a469027d0..811be568a 100644 --- a/airtime_mvc/tests/README.txt +++ b/airtime_mvc/tests/README.txt @@ -1,6 +1,6 @@ To get the Airtime unit tests running: ========================== - + 1) Install PHPUnit We explicitly install PHPUnit 3.4 because that the most recent version From 7ee5c8ffd7e49b4149665d8dc559a9b39d8183cd Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Mon, 10 Feb 2014 13:32:41 -0500 Subject: [PATCH 3/6] Another dummy commit for Bamboo --- airtime_mvc/tests/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/tests/README.txt b/airtime_mvc/tests/README.txt index 811be568a..a469027d0 100644 --- a/airtime_mvc/tests/README.txt +++ b/airtime_mvc/tests/README.txt @@ -1,6 +1,6 @@ To get the Airtime unit tests running: ========================== - + 1) Install PHPUnit We explicitly install PHPUnit 3.4 because that the most recent version From 3b9608a8df886702181f28c951498085db0b4659 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 10 Feb 2014 16:19:26 -0500 Subject: [PATCH 4/6] CC-5693: API call to notify-item-start-playing fails because an invalid schedule id is sent Temporary fix for this bug. Throw an exception if no schedule item is found. --- airtime_mvc/application/controllers/ApiController.php | 10 +++++----- airtime_mvc/application/services/HistoryService.php | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 65306306a..d75b64b45 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -395,13 +395,13 @@ class ApiController extends Zend_Controller_Action $media_id = $this->_getParam("media_id"); Logging::debug("Received notification of new media item start: $media_id"); Application_Model_Schedule::UpdateMediaPlayedStatus($media_id); - - $historyService = new Application_Service_HistoryService(); - $historyService->insertPlayedItem($media_id); - //set a 'last played' timestamp for media item - //needed for smart blocks try { + $historyService = new Application_Service_HistoryService(); + $historyService->insertPlayedItem($media_id); + + //set a 'last played' timestamp for media item + //needed for smart blocks $mediaType = Application_Model_Schedule::GetType($media_id); if ($mediaType == 'file') { $file_id = Application_Model_Schedule::GetFileId($media_id); diff --git a/airtime_mvc/application/services/HistoryService.php b/airtime_mvc/application/services/HistoryService.php index c8ac571bc..73821ce92 100644 --- a/airtime_mvc/application/services/HistoryService.php +++ b/airtime_mvc/application/services/HistoryService.php @@ -560,6 +560,9 @@ class Application_Service_HistoryService try { $item = CcScheduleQuery::create()->findPK($schedId, $this->con); + if (is_null($item)) { + throw new Exception("Invalid schedule id: ".$schedId); + } //TODO figure out how to combine these all into 1 query. $showInstance = $item->getCcShowInstances($this->con); From d3307a6cf07adc39440cfe000e5e089128e9d23d Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 11 Feb 2014 09:42:09 -0500 Subject: [PATCH 5/6] testing for bamboo commit trigger --- README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README b/README index 3b4f0147f..2755e6bfd 100644 --- a/README +++ b/README @@ -48,3 +48,5 @@ Forums and mailing lists: http://forum.sourcefabric.org Bug tracker: http://dev.sourcefabric.org Source code: http://github.com/sourcefabric/Airtime IRC chat: #airtime on Freenode + +testing for bamboo server - dr From 92b6f391abcb91d1069b530d148118a856e0870a Mon Sep 17 00:00:00 2001 From: drigato Date: Tue, 11 Feb 2014 09:47:16 -0500 Subject: [PATCH 6/6] Removed testing messgae from README --- README | 1 - 1 file changed, 1 deletion(-) diff --git a/README b/README index 2755e6bfd..657998cc5 100644 --- a/README +++ b/README @@ -49,4 +49,3 @@ Bug tracker: http://dev.sourcefabric.org Source code: http://github.com/sourcefabric/Airtime IRC chat: #airtime on Freenode -testing for bamboo server - dr